Reputation: 11
I want to create a PDF using Apache fop . The requirement is that I want to create bookmarks in PDF using xsl fo stylesheets . Please provide me an example of how to achieve this .
Upvotes: 0
Views: 1421
Reputation: 8068
Use the formatting objects for bookmarks defined in XSL 1.1. See https://www.w3.org/TR/xsl11/#d0e14206
FOP's conformance is shown at https://xmlgraphics.apache.org/fop/compliance.html#fo-object-bookmarks-section
There is sample FO and PDF at "PDF Bookmarks (<fo:bookmark-tree>, <fo:bookmark>)" in the "XSL-FO Samples Collection > PDF Features" at https://www.antennahouse.com/xsl-fo-samples#pdf
Upvotes: 2
Reputation: 21
<fo:bookmark-tree>
<fo:bookmark internal-destination="B1">
<fo:bookmark-title>Bookmark 1</fo:bookmark-title>
</fo:bookmark>
</fo:bookmark-tree>
<fo:block id="B1">
...
</fo:block>
Upvotes: 2