PDF bookmarks

PDF files can optionally include an active table of contents that is displayed alongside the pages in the PDF viewer. These references are called bookmarks.

PDF bookmarks are generated using special functions in each XSL-FO processor because XSL cannot produce them directly. So if you are using Apache FOP, for example, you need to turn on the FOP extension functions by setting the fop.extensions parameter to 1. For example:

xsltproc  --output myfile.fo  \
  --stringparam  fop.extensions  1 \
  fo/docbook.xsl  myfile.xml

If you are instead using Antenna House's XSL Formatter, you should set the axf.extensions parameter to 1, or if you are using RenderX's XEP you should set the xep.extensions parameter to 1. When you turn on one of these extensions, special FO elements and/or attributes are written by the DocBook XSL stylesheets to the FO file. These elements and attributes belong to processor-specific namespaces. By convention, the following namespace prefixes are used: fox for FOP, axf for Antenna House, and rx for XEP. Those special FO elements are only recognized by the specific processor being used. If you turn on the wrong extensions, you probably will not be successful.

Note

These FO extensions are not controlled by the use.extensions parameter. That parameter controls the use of XSLT extension functions used by some XSLT processors, not the extensions in the FO processors.