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 should start from a copy of the file [OXYGEN_INSTALL_DIR]/frameworks/docbook/xsl/fo/titlepage.templates.xml and customize it. The instructions for the spec file can be found here.

    An example of spec file:

    <t:titlepage-content t:side="recto">
        <mediaobject/>
        <title
            t:named-template="book.verso.title"
            font-size="&hsize2;"
            font-weight="bold"
            font-family="{$title.font.family}"/>
        <corpauthor/>
          ...
    </t:titlepage-content>
  2. Generate a new XSLT stylesheet from the title spec file from the previous step.
    Apply [OXYGEN_INSTALL_DIR]/frameworks/docbook/xsl/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 element 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 plugin and set the customization layer in the XSL URL property of the scenario.