Template editor
Docs/Design templates

Headers, footers and page numbers

Add repeated header and footer content, set separate margins, hide it on a cover, and insert automatic page numbers.

5 min read5 sections
On this page

A document title at the top, contact details at the bottom, or a “1 / 3” page label can all live in Header and Footer. Write the content once, and Tembuilder repeats it on the PDF sheets where that part is enabled.

Header and Footer sit under Global in Structure. Their content is shared, while each page can show or hide them—for example, a cover can omit both while the main content keeps them.

Expand Global in Structure, then select Add global element → Header or Footer. If it already exists, select it directly in the list to edit it.

The toggle beside each item controls its Global visibility. Turning it off hides that part across the document while keeping the content you wrote.

Adding a new Header or Footer is available in the base variant. Switch back to the base if you are editing another variant and do not see Add global element.

STRUCTURE
⌄ Global 1/2
▤ Footer
+ Add global element
▤ Header
Header / Footer
Tembuilder INVOICE
INVOICETB-2026-0042
Structure → Global → Add global element → Header or Footer

2. Edit the repeated content

Select Header or Footer to open its HTML, CSS, Props, and Config tabs.

With an existing template, start in Props to update a company name, website, or label used by that template. For example, the invoice template has a footerWebsite prop for the website shown at the bottom of the page.

Use HTML to change content or structure, and CSS to change its presentation. In Header/Footer HTML, {{ props.propName }} reads a prop belonging to that part; {{ global.props.propName }} reads a prop from Global.

Global → Footer → Props
HTMLCSSPropsConfig
FOOTER
footerWebsiteText
VALUEtembuilder.com{{ props.footerWebsite }}
Global → Footer → Props → footerWebsite

Open Header → Config → Margin or Footer → Config → Margin. Enable margins and enter the four sides in mm. The Background section below sets the background of that Header or Footer.

These margins are separate from Content margin. To align a header logo with a table in the body, set the Header’s Left/Right margins to match the content area’s Left/Right margins.

Header/Footer height follows its content, including its own margins. Content margin → Top/Bottom provides the gap between that area and the main content. To increase the gap after a Header, change Content margin Top; to inset a logo inside the Header, change the Header’s margins or CSS.

Global → Header → Config
PropsConfig
Margin · mm
Top4
Left14
Right14
Bottom4
HeaderMargin
Content margin · Top
Section content
Header/Footer margins and Content margin are separate settings

4. Hide it on a cover or a specific page

Select a page in Structure → Config → Layout, then turn off Header or Footer. For example, Cover can hide both while Invoice keeps them.

The shared content in Global stays intact. Turn the corresponding Layout setting back on to show it on this page again.

If a setting says off globally, enable the Header/Footer in Global first. A page cannot enable a part that is turned off globally.

To give a cover different settings from the main content, make it a separate page in Structure.

Structure → Cover → Config
Config
Layout
Header
Footer
Cover · Off
INVOICETB-2026-0042
Invoice · On
Tembuilder INVOICE
INVOICETB-2026-0042
Turn off Header/Footer for the cover page while keeping them in the content

5. Insert automatic page numbers

Add this to Footer or Header HTML:

<span>{{ global.props.page_number }} / {{ global.props.total_pages }}</span>

These values are built into Global Props and filled by the system when the document is generated:

Value Content
global.props.page_number The current PDF sheet number.
global.props.total_pages The total PDF sheet count.

You do not need to create another prop to store page numbers. For a three-sheet document, this example displays 1 / 3, 2 / 3, and 3 / 3.

Numbers refer to PDF sheets, not the number of pages in Structure. One Structure page can produce several sheets, each with its own number. Hiding Header/Footer on a cover does not exclude that sheet from the total count.

Global → Footer → HTML
HTMLCSSPropsConfig
{{ global.props.page_number }} /
{{ global.props.total_pages }}
Tembuilder INVOICE
INVOICETB-2026-0042
Tembuilder INVOICE
INVOICETB-2026-0042
Tembuilder INVOICE
INVOICETB-2026-0042
System values show the current PDF sheet and total sheet count

Search documentation