PDF Style Guide

Introduction

The ETAS EHANDBOOK solution is an interactive documentation tool set. This solution consists in 3 parts: the EHANDBOOK Container-Build tool chain for the container generation, later called EHB-CB, the container itself, which is containing the documentation data in a special format and the EHANDBOOK NAVIGATOR, the tool to work with the containers, later called EHB-NAV.

Besides container generation, a PDF document can be created in addition. The configuration details of the PDF are described in detail below.

Generation of the PDF Document

The creation of the PDF document happens as an optional post-processing step after the container generation. It is invoked by a checkbox from the GUI-version of the EHB-CB Add-on or via the command line option -pdf for the CLI-version of EHB-CB.

The PDF contains two tables of contents:

  1. Hierarchical software view of the function components (as in EHB-NAV)

  2. Alphabetical view of the function components

The page sorting of the content for the function components is in order to the hierarchical software view. The same applies to the bookmarks, which are also available in the PDF.

General Styling and PDF Customization

The styling of the PDF is configured in a file PdfCustomization.xsl formatted as XML stylesheet. The file have to be placed in the Styling folder. The styling folder location is set in the user input dialog for GUI based EHB-CB versions or via -styling command line parameter for command line based EHB-CBs.

You may use different stylings, defined in separate folders and pick the de-sired one then in the user input dialog. This can be useful for different texts and stylings for different documents, like ‘Draft’ or ‘Released’ versions.

The style definitions are standardized in XSL Formatting Objects (XSL-FO).

See the following standards:

Here is a sample structure and a subset of possible attributes of the formatting objects for the text styling:

<xsl:attribute-set name="header_text">

	<xsl:attribute name="font-size">9pt</xsl:attribute>

	<xsl:attribute name="font-weight">bold</xsl:attribute>

	<xsl:attribute name="font-style">italic</xsl:attribute>

	<xsl:attribute name="color">black</xsl:attribute>

	<xsl:attribute name="font-family">sans-serif</xsl:attribute>

</xsl:attribute-set>

PDF Content Customization & Debug Information

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 EHB-CB.

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:

image4

Model Hierarchies printed

Independent of the amount of model hierarchies shown in the text pane of the container, there can be a screenshot printed in the PDF for every model hierarchy of the model. To do so, the following line has to be set in the eHandbookCB.ini:
-DmodelSnapshotsRequired=true

Sub Chapters in TOC

The amount of sub chapter levels shown in the TOC of the PDF can be configured as follows:

-DpdfTocLevel=value

Parameter value Description

-DpdfTocLevel=All

All the chapter levels will be part of table of contents

-DpdfTocLevel=N

-DpdfTocLevel=5

N chapter levels will be in table of contents

No entry or

-DpdfTocLevel=Default

Chapter levels as per ASCET Project will be in table of contents.

Levels till the Function Component Name as seen in EHB-NAV text pane

Logging Information

For verbose logging information, the following line has to be set:
-DdebugRequired=false (default)

Styling taken from Source Container

The style of the title page, the header image and the footer text information is taken 1:1 from the container configuration. For details, please refer to the container style guide for EHB-CB document.

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.

image5

Default Font Settings

The default font of the PDF documentation can be set with:

<xsl:attribute-set name="__fo__root">

	<xsl:attribute name="font-family">Arial, sans-serif</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.

Header Styling

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-left-right"/>

	<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 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>

Section and Subsection Text Styling

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,sans-serif</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,sans-serif</xsl:attribute>

</xsl:attribute-set>

Subsection styles can be provided within the following attribute sets:

topic.title (section title)

topic.topic.title (first level subsection)

topic.topic.topic.title (second level subsection)

Paragraph Text Styling

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>

Table Text Styling

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>
image6

Figure Styling

The Figure background color can be defined within the attribute-set “fig”.

Sample Figure style:

<xsl:attribute-set name="fig">

	<xsl:attribute name="background-color">white</xsl:attribute>

</xsl:attribute-set>

Limitations

If a chapter name exceeds the page width, then chapter name overlaps with page number and not shown completely in table of contents.

What’s New

  1. Print all hierarchies in PDF will work for all model types. See chapter Model Hierarchies printed