Blink PDF lets you define a header and a footer that repeat consistently on every page of your rendered document. You configure both inside theDocumentation Index
Fetch the complete documentation index at: https://docs.blinkpdf.io/llms.txt
Use this file to discover all available pages before exploring further.
options object of your POST /v1/render request body — no templates to host, no HTML to write. Headers and footers support dynamic variables so you can automatically inject the current page number, total page count, document title, and render date without any post-processing.
The parameter names shown on this page reflect the most likely field names based on the Blink PDF API design. Confirm exact names and any additional variables in the API Reference before using them in production.
How Headers and Footers Work
When you setoptions.header or options.footer, Blink PDF stamps that content on every page of the PDF at render time. The values are plain strings that may contain:
- Static text — your company name, document classification, or any fixed label.
- Template variables — placeholders that Blink PDF resolves per-page before stamping (see Available Variables below).
options.margins.top or options.margins.bottom accordingly.
Header and Footer Parameters
Text to display in the header area at the top of every page. Supports static text and template variables. Leave unset to render pages with no header.Example:
"Acme Corp — Confidential" or "{{title}} | {{date}}"Text to display in the footer area at the bottom of every page. Supports static text and template variables. Leave unset to render pages with no footer.Example:
"Page {{page}} of {{totalPages}}" or "© 2025 Acme Corp | {{page}}"Page Number Options
Page numbers are configured through theoptions.pageNumbers object. You can enable standalone page numbers independently of a full footer string, control their format, and choose where they appear.
Controls automatic page number rendering. If you include
{{page}} or {{totalPages}} in options.footer, you do not need this object — the variables are resolved automatically.Available Variables
Use these placeholders anywhere inside youroptions.header or options.footer strings. Blink PDF replaces them with the correct value for each individual page before stamping.
| Variable | Resolved value |
|---|---|
{{page}} | The current page number (e.g., 3) |
{{totalPages}} | The total number of pages in the document |
{{title}} | The value of metadata.title, if set |
{{date}} | The render date in YYYY-MM-DD format |
{{author}} | The value of metadata.author, if set |
Example: Company Header and Page-Numbered Footer
The following request renders a policy document with a branded header on every page and a centered “Page X of Y” footer.Headers and footers are stamped on every page, including the first. If your document starts with a cover page and you want that page to have no header or footer, consider rendering the cover as a separate request and merging the PDFs downstream.