Skip to main content
Headers and footers appear on every page of your generated PDF. They’re ideal for page numbers, document titles, dates, and branding.

Enabling Headers & Footers

In the Settings panel:
  1. Toggle Header or Footer to enabled
  2. Set the Height in millimeters
  3. Enter the Content (HTML)

Header Configuration

Special CSS Classes

Fileloom provides special CSS classes that are automatically populated:

Example: Page Numbers

Output: Page 1 of 5

Example: Header with Logo and Title

Styling Headers & Footers

Headers and footers support inline CSS:
Headers and footers have a separate rendering context from the main document. External stylesheets and CSS from the main template don’t apply. Use inline styles.

Important Notes

Margin Requirements

The top margin must accommodate the header height, and the bottom margin must accommodate the footer height. Fileloom automatically adjusts margins if they’re too small. Example:
  • Header height: 15mm
  • Footer height: 10mm
  • Minimum top margin: 15mm
  • Minimum bottom margin: 10mm

Font Loading

For consistent fonts in headers/footers, use web-safe fonts or inline the font:
Or reference Google Fonts directly:

Dynamic Content

You cannot use Handlebars variables directly in header/footer content. The special classes (pageNumber, totalPages, etc.) are the only dynamic values available. For document-specific content in headers/footers, include it in the main HTML body positioned at the top/bottom of each page using CSS.

Headers & Footers via API

When using raw HTML, configure headers and footers in the options:

Common Patterns

Centered Page Numbers

Right-Aligned Page Numbers

Date in Header