<< back

PDF Bookmarks

PD4ML API provides a method to generate PDF bookmarks (outlines) either from H1-H6 heading structure or from named anchors.

pd4ml.generateOutlines(false); // from <a name="anchor name">...</a> 
or
pd4ml.generateOutlines(true); // from <H1>-<H6>
In the first case it produces a flat list of bookmarks:

Headings result a tree-like multilevel bookmark structure:

If some levels need to be excluded from the bookmarks tree, there is a special CSS property / HTML attribute for that:

H3 { pd4ml-bookmark-visibility: hidden } 
( or <h3 pd4ml-bookmark-visibility="hidden"> if  you need to suppress a single bookmark)