PDF Configuration & Styling Guide
Besides generating an interactive documentation as an EHANDBOOK Container file, EHANDBOOK Container-Build can additionally generate a static documentation in the form of a single PDF file.
Content Configuration
The structure of the TOC and the amount of model hierarchies shown in the PDF can be configured in the eHandbookCB.ini, which is located in the installation directory of EHBCB.
For the ASCET Add-on for EHB-CB this is typically the ’tool’ sub directory of the ASCET installation. (e.g. C:\ETAS\ASCET6.1\Tools\EHANDBOOK_CB\tool).
Sample content of the eHandbookCB.ini:
Title Page
The style and contents for the title page is taken directly from the corresponding configuration. It is valid for both EHANDBOOK Containers as well as PDF files. For details, please refer to the EHANDBOOK container style guide.
PDF Page Styling
The style of all pages besides the title page can be customized with an XML stylesheet. A file with the name PdfCustomization.xsl must be placed within the Styling folder.
Fonts
The default font of the PDF documentation can be set with:
<xsl:attribute-set name="__fo__root">
<xsl:attribute name="font-family">Arial, sansserif</xsl:attribute>
</xsl:attribute-set>
It is allowed to specify a list of fonts, which will be used. The order of the font, which will be picked from the list, is from left to right. If the font is not installed on your machine, the next font from the list will be selected. A font list of Arial, Helvetica, sans-serif would select Arial, then Helvetica and then any other sans-serif font. |
Page Header
The style of the header like font size, font family, color and more can be defined within the attribute-set "header_text".
Sample header text style:
<xsl:attribute-set name="header_text">
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="color">black</xsl:attribute>
<xsl:attribute name="font-family">sans-serif</xsl:attribute>
</xsl:attribute-set>
The header text alignment is set as:
<xsl:attribute-set name="header_align">
<xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>
The header background color is set as:
<xsl:attribute-set name="odd__header">
<xsl:attribute name="text-align">start</xsl:attribute>
<xsl:attribute name="padding-left" select="$page-margins-leftright"/>
<xsl:attribute name="line-height">6mm</xsl:attribute>
<xsl:attribute name="end-indent">0pt</xsl:attribute>
<xsl:attribute name="space-after.conditionality">retain</xsl:attribute>
<xsl:attribute name="background-color">#00904C</xsl:attribute>
</xsl:attribute-set>
The contents for the page header such as header text and image are taken from the |
Page Footer
The style of the footer like font size, font family, color and more can be defined within the attribute-set "footer_text".
Sample footer text style:
<xsl:attribute-set name="footer_text">
<xsl:attribute name="font-size">9pt</xsl:attribute>
<xsl:attribute name="color">black</xsl:attribute>
<xsl:attribute name="font-family">sans-serif</xsl:attribute>
</xsl:attribute-set>
The footer text alignment is set as:
<xsl:attribute-set name="footer_align">
<xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>
The contents for the page footer such as footer text and image are taken from the |
Section and Subsection Headings
The style of the section’s title like font size, font family, color and more can be defined within the attribute-sets "topic.title", "topic.topic.title" and "topic.topic.topic.title".
Example for the section title text style:
<xsl:attribute-set name="topic.title">
<xsl:attribute name="color">#FF4400</xsl:attribute>
<xsl:attribute name="font-size">1.77em</xsl:attribute>
<xsl:attribute name="font-family">Arial,sansserif</xsl:attribute>
</xsl:attribute-set>
Example for first level subsection style:
<xsl:attribute-set name="topic.topic.title">
<xsl:attribute name="color">#FF4400</xsl:attribute>
<xsl:attribute name="font-size">1.77em</xsl:attribute>
<xsl:attribute name="font-family">Arial,sansserif</xsl:attribute>
</xsl:attribute-set>
Subsection styles can be provided within the following attribute sets:
|
Paragraph Texts
The style of the paragraph like font size, font family, color and more can be defined within the attribute-set p.
Sample paragraph style:
<xsl:attribute-set name="p">
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="font-family">Times New Roman, serif</xsl:attribute>
</xsl:attribute-set>
Tables
The style of tables like font size, font family, color and more can be defined within the attribute-set table.data.
Sample table text style:
<xsl:attribute-set name="table.data">
<xsl:attribute name="font-family">Times New Roman</xsl:attribute>
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="color">blue</xsl:attribute>
</xsl:attribute-set>