Customizing the Header and Footer in PDF Output
This procedure should only be used for the DITA Map PDF - based on XSL-FO transformation scenario.
The XSLT stylesheet DITA-OT-DIR/plugins/org.dita.pdf2/xsl/fo/static-content.xsl contains templates that output the static header and footers for various parts of the PDF such as the prolog, table of contents, front matter, or body.
The templates for generating a footer for pages in the body are called
insertBodyOddFooter
or insertBodyEvenFooter
.
These templates get the static content from resource files that depend on the language used for generating the PDF. The default resource file is DITA-OT-DIR/plugins/org.dita.pdf2/cfg/common/vars/en.xml. These resource files contain variables (such as Body odd footer) that can be set to specific user values.
- Create a customization directory (if you have not already done so).
- Locate the stylesheets and templates listed above in your customization directory and
modify them in whatever way necessary to achieve your specific goal.Tip: For more information and examples, see the Oxygen PDF Customization Plugin project on GitHub.
- Edit the DITA Map PDF - based on XSL-FO transformation scenario, go to the Parameters tab, and set the customization.dir parameter to point to the location of your customization directory.