Managing the Settings of a Template
You can manage a number of settings that will apply to all documents generated from the current template. To edit those settings, click the gear icon in the Template Panel.
The Template settings panel will appear.
When you have finished editing the template settings, click the Edit button to return to your template.
You can set the following parameters for your template's settings:
Set the PDF standard that your output documents will comply with. iText DITO supports these standards:
- PDF: the regular PDF specification
- PDF/UA: the Universal Accessibility specification for PDF documents. Documents that comply with this standard are "accessible" as defined by the PDF/UA standard. That means that they are set up to support assistive technology like screen readers. iText DITO has a PDF/UA Compliance Assistant that helps you comply with the standard.
The title will be written in the title tag of your output documents. Many PDF readers and browsers will display this title, typically at the top of the window. The title can be set as a static or a dynamic value:
- Static Title - If you select this option the tile will be a constant value that is identical for all documents produced
- Title from data - If you select this option the title is based on a field value from your data set, for instance the name of the customer. Click the ellipsis button to bind the title to a field from your data set.
If the template is set up to comply with the PDF/UA standard, title is a required field.
In the language field you can select the main language of the document. This setting is helpful for assistive technology like screen readers. The language can be set statically or dynamically:
- Predefined language - select the main language of the resulting PDF documents from a list of languages
- Language from data - you can bind the selection of the document language to the value of a field in the data set. A typical use case would be a template that contains conditional content in more than one language, the language that is displayed depends on a field that indicates the language of the intended recipient. Dynamic values should be formatted as a two-digit locale code or a locale code and a country code joined together with a hyphen (e.g. 'en' or 'en-US').
If the template is set up to comply with the PDF/UA standard, language is a required field.
Page Size and Orientation
The page size setting defines the dimensions of each pages in the resulting PDF documents. Page sizes can be defined by selecting a common page format from the drop-down, or by setting custom values for width and height (supported units).
You can also define page orientation to be portrait or landscape.
Using custom CSS, you can set different page sizes for the first page, the left pages or the right pages of your template. The below example will set the height of the first page to 600 points and the width of the first page to 400 points.
Set the margins for the documents that will be created using the current template (supported units). Margins can be edited individually or collectively.