PD4ML supports two different methods to generate PDF bookmarks (also known as outlines):

  1. Converting of HTML headings structure to a corresponding bookmark structure.
  2. Listing of HTML named anchors (HTML destinations) as bookmarks.

By default PD4ML does not generates document bookmarks. In order to enable the generation, an API method generateOutlines(boolean) should be triggered before render(…) method call. It can be called with one of the two available parameter values: true – to use headings structure for bookmarks; false – to use named anchors.

(In PD4ML taglib the generation process is controlled by outline attribute of <pd4ml:transform>. It can be assigned to the values “none”“headings” or “anchors”)

  • What do “named anchors” mean? Named anchors (or destinations) are defined in HTML code like the following: 
    <a name=”destination”>label</a>
    Note: do not use nested HTML tags for label definition.
  • What do “headings” mean? Headings are HTML tags <h1> … </h1> to <h6> … </h6> whose hierarchy can be used by PD4ML to generate tree-like bookmarks structure.