Guide: Header and footer templates
Learn how to set and format page headers and footers.
When creating jobs, the header_template
and footer_template
parameters can be used to insert headers, footers, or both on each page.
Be sure to set a large enough margin_top
(for headers) or margin_bottom
(for footers).
Otherwise, the page content might overlap and hide your header or footer.
The template must be in HTML format. You can add the following classes to an element to substitute a dynamic value into that element on each page:
pageNumber
- the current page numbertotalPages
- the total number of pages in the documentdate
- the current datetitle
- the title of the web pageurl
- the URL of the web page
When setting a header or footer template, there are two crucial points to note:
You must use
header_template
in conjunction withmargin_top
andfooter_template
in conjunction withmargin_bottom
.CSS from the web page does not flow down to the header or the footer. Specifically, you'll want to set a
font-size
for your template so that the text is legible.
Example header or footer template
Example API request
Here's an example new job API request (in JSON format) which sets a footer and a bottom margin:
Last updated