-
Notifications
You must be signed in to change notification settings - Fork 2
Cover Page Customization
The cover page for the PDF output might be the first thing you want to customize since most companies want a custom design for the first page, such as a unique logo and a title with custom fonts.
For our PDF customization of the oXygen XML Editor user manual, we chose a pretty simple design with our logo and a specific title in front of a custom background:
To implement this, we made the following customizations:
-
Logo and title
Logo and title customization is implemented in the com.oxygenxml.pdf2.ug/Customization/fo/xsl/front-matter.xsl stylesheet by overriding the createFrontCoverContents template.
This template is used to generate a table with one row. The row has two cells for a logo and a title.
-
Cover page background
This customization is implemented in the com.oxygenxml.pdf2.ug/Customization/fo/attrs/layout-masters-attr.xsl stylesheet (see the region-body__frontmatter.odd attribute set).
This attribute set defines the background-image property for the fo:region-body associated with the front cover page. To impose a fixed dimension to the background image, we used two Apache FOP extensions: fox:background-image-width and fox:background-image-height.
This customization is used to generate three distributions of our user manual for the following products: oXygen XML Editor, oXygen XML Author, and oXygen XML Developer.
Each of the published distributions have different logos and background images. Therefore, we needed an XSLT parameter to identify the current published distribution. In this scope, we declared the oxy-ug-distribution parameter in the com.oxygenxml.pdf2.ug/Customization/fo/xsl/custom.xsl stylesheet. To make this parameter available for the DITA ANT process, it should be also declared in com.oxygenxml.pdf2.ug/plugin.xml](https://github.com/radu-pisoi/com.oxygenxml.pdf2.ug/blob/master/plugin.xml) (see the dita.conductor.pdf2.param extension point).