Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.blinkpdf.io/llms.txt

Use this file to discover all available pages before exploring further.

Blink PDF lets you define a header and a footer that repeat consistently on every page of your rendered document. You configure both inside the 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 set options.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).
Both the header and footer are rendered within your configured margin space. If your margins are too narrow for the text to fit, increase options.margins.top or options.margins.bottom accordingly.
options.header
string
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 the options.pageNumbers object. You can enable standalone page numbers independently of a full footer string, control their format, and choose where they appear.
The options.pageNumbers object and its nested fields (enabled, format, position) are not yet publicly confirmed in the Blink PDF API reference. These names reflect the most likely design. Verify exact field names in the API Reference or with support before using in production.
options.pageNumbers
object
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 your options.header or options.footer strings. Blink PDF replaces them with the correct value for each individual page before stamping.
VariableResolved 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
Combine {{title}} in the header with Page {{page}} of {{totalPages}} in the footer to create self-contained documents that are easy to navigate when printed or shared as individual pages.
The following request renders a policy document with a branded header on every page and a centered “Page X of Y” footer.
curl -X POST https://api.blinkpdf.io/v1/render \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Employee Leave Policy\n\n## Overview\n\nThis policy governs all forms of leave available to full-time employees.\n\n## Annual Leave\n\nAll employees accrue 20 days of annual leave per calendar year.\n\n## Sick Leave\n\nUp to 10 days of paid sick leave are available per year without a medical certificate.",
    "metadata": {
      "title": "Employee Leave Policy",
      "author": "Acme HR Department"
    },
    "options": {
      "header": "Acme Corp — Internal Use Only",
      "footer": "Page {{page}} of {{totalPages}}",
      "margins": {
        "top": "28mm",
        "bottom": "28mm",
        "left": "20mm",
        "right": "20mm"
      }
    }
  }'
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.