Edit online

DocBook to PDF Output Customization

When the default layout and output of the DocBook to PDF transformation needs to be customized, follow these steps:

  1. Create a custom version of the DocBook title spec file.

    You could start from a copy of the file [DocBook XSL directory]/fo/titlepage.templates.xml (for example, [OXYGEN-INSTALL-DIR]/frameworks/docbook/xsl/fo/titlepage.templates.xml) and customize it. More information about the spec file can be found here.

  2. Generate a new XSLT stylesheet from the title spec file from the previous step.
    Apply [DocBook XSL directory]/template/titlepage.xsl to the title spec file. The result is an XSLT stylesheet (for example, mytitlepages.xsl).
  3. Import mytitlepages.xsl in a DocBook customization layer.
    The customization layer is the stylesheet that will be applied to the XML document. The mytitlepages.xsl should be imported with an element like this:
    <xsl:import href="dir-name/mytitlepages.xsl"/>
  4. Insert a logo image in the XML document.
    The path to the logo image must be inserted in the book/info/mediaobject structure of the XML document.
  5. Apply the customization layer to the XML document.
    A quick way is to duplicate the transformation scenario DocBook PDF that is included with Oxygen XML Author and set the customization layer in the XSL URL property of the scenario.