DocBook to PDF Output Customization
When the default layout and output of the DocBook to PDF transformation needs to be customized, follow these steps:
- 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.xmland 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> - Generate a new XSLT stylesheet from the title spec file from the previous
step.Apply
[OXYGEN_INSTALL_DIR]/frameworks/docbook/xsl/template/titlepage.xslto the title spec file. The result is an XSLT stylesheet (for example,mytitlepages.xsl). - Import
mytitlepages.xslin a DocBook customization layer.The customization layer is the stylesheet that will be applied to the XML document. Themytitlepages.xslshould be imported with an element like this:<xsl:import href="dir-name/mytitlepages.xsl"/>
- Insert a logo image in the XML document.The path to the logo image must be inserted in the
book/info/mediaobjectelement of the XML document. - 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.