Document TemplatePage Headers and Footers
Defining page headers and footers in a document template are done at in the 'section' level - there can be multiple sections, so page headers and footers change on a section by section basis .
Sample Section
Define a page header that shows the page number right justified on the page, and a page footer that shows the date centered on the bottom of the page.
{ "section": { "header": { "primary": { "textformat": { "justification": "Right" }, "text" : "Page {{pageno}}" } }, "footer" : { "primary": { "textformat": { "justification": "Center" }, "text" : "Date {{date}}" } } }, ... }
Note that even though 'text' is used as the content, the headers and footers can contain html or table objects instead if finer control and formatting is desired.
Under the 'header' and 'footer' in this example, 'primary' is defined. Both Headers and Footers are defined as primary, even, and first.
The setting of 'primary' defines the default content for a page header
The setting of 'even' defines alternating header / footer styles to show on even numbered pages, for example if you want to change the justification of the text.
The setting of 'first' defines a special case for the first page, for example if you want to ommit the page number of the first page.
Place Holders
Place holders present in the static content are replaced with system fields for page number and date.
- Placeholder
- Description
- {{pageno}}
Page number placeholder
- {{pagecount}}
Total number of pages.
- {{date}}
Date that document was generated.