Book a Demo
Prev Next

Templates For Generating PDFs

Enterprise Architect provides a set of document templates for you to use when generating PDF files from your Help models, so you can get started right away.  The provided templates are 'system' templates and as such cannot be modified.  However, you are free to copy and save them as 'custom' templates, which you can then modify as you see fit.  When specifying the templates to use for document generation, you are free to choose from system templates or your own custom templates.

For more information on creating new document templates, see the Help topic All About Document Templates.

Template Types

The 'Generate Documentation' dialog has four fields in which you can specify different templates.  The fields are labelled Template, Cover Page, Table of Contents and Stylesheet.  The templates specified in each of these fields serves a specific purpose, as described below.

Document Template

The main document template is used to define the content and layout of the body of the generated document.  It is specified in the 'Template' field of the 'Generate Documentation' dialog.  The system template 'User Guide' has been provided as a starting point for you.  It calls on the template fragment 'Help Template Selector'.  The selector template in turn specifies which template fragments are used to render the different types of elements that make up a Help model.

Cover Page Template

This template defines the content and layout of the Cover Page for your document.  It is specified in the 'Cover Page' field.  If you don't want to generate a cover page for your document, you can choose '<none>' instead of a template name.  The system template 'User Guide Cover' has been provided as a starting point for you.  The template 'User Guide Cover' applies various formatting styles to the text and fields that it uses.  Those styles are defined in the stylesheet template.

Table of Contents Template

This template that defines the content and layout of the Table of Contents Page for your document.  It is specified in the 'Table of Contenets' field.  If you don't want to generate a table of contents page for your document, you can choose '<none>' instead of a template name.  The system template 'User Guide TOC' has been provided as a starting point for you.  The template 'User Guide TOC' applies various formatting styles to the text and fields that it uses.  Those styles are defined in the stylesheet template.

Stylesheet Template

A stylesheet template is used to define character and paragraph formatting styles.  Those styles can then be used by the various 'content' templates to apply different formatting styles to specific sections of the generated documents.  The stylesheet template is specified in the 'Stylesheet' field of the 'Generate Documentation' dialog.  The system template 'User Guide Styles' has been provided as a starting point for you.  It defines a large number of styles, such as Heading1, Heading2, CoverHeading1, CoverHeading2, Help Element Header, Help Section Header, TableHeading, TableText and Normal, that are used by (referenced by) the other templates in the set provided.  You can also choose <none>, which will give you a reduced set of standard styles, such as Normal, Heading1, Heading2 and so forth.  Note however, that the various provided templates make use of several non-standard styles defined within 'User Guide Styles'.  So it is recommended that you use the stylesheet template provided, at least until you have a good grasp of how all the templates fit together and which formatting styles you are using.  Like all of the other templates, you can copy and save 'User Guide Styles' as a custom template, then subsequently modify it as you see fit.  You could change the formatting styles it defines to use different paragraph formatting, fonts, text size or color.  You can also add or delete styles from the existing definitions.

Selector Template

The document template 'User Guide', makes use of Enterprise Architect's template selector facility.  It calls on the template fragment 'Help Template Selector', which in turn specifies which template fragments are used to render the different types of elements that make up a Help model.  There is a separate template fragment corresponding to each of the stereotyped elements available in the UML profile 'HelpSystem', with the exception of HelpTableRow.  The selector template has an entry for (nearly) every stereotyped class defined in the 'HelpSystem' profile.  The exceptions are  HelpTableRow, HelpSectionLearnMore, HelpSlideshow and HelpSystemVideo.  HelpTableRows are handled as child elements in each of the HelpTable template fragments, so they don't need an entry in the selector template.  At Sparx Systems, we do not generate the HelpSectionLearnMore elements in PDF documents, as they typically contain hyperlinks to related Help topics.  The generated hyperlinks work well in generated HTML files, but not in PDF documents.  Similarly, the Slideshows and Videos work well in HTML web pages, but not so much in PDF documents.  If you want to generate content in your PDF documents for elements of these types, simply add an entry to the selector template, following the format of the existing entries.

For more information see the Help topic How to Define a Template Selector Fragment.

Template Fragments

There is a separate template fragment corresponding to each of the stereotyped elements available in the UML profile 'HelpSystem', with the exception of HelpTableRow.  The HelpTableRow is handled as a child element in each of the HelpTable templates.  The template fragments apply various formatting styles to the text and fields that it uses.  Those styles are defined in the stylesheet template 'User Guide Styles'.

The provided templates are 'system' templates and as such cannot be modified.  However, you are free to copy and save them as 'custom' templates, which you can then modify as you see fit.

Learn more