How do dynamic tokens work in a custom PDF header and footer?
Placeholders inside curly braces expand dynamically for each page during stamping without requiring manual edits per sheet. A custom PDF header and footer can combine static labels with live tokens: Footer starts prefilled with Page {page} of {total}, while Header accepts up to 120 characters of company names or {date} stamps.
Using {page}, {total}, and {date} placeholders
When the worker stamps page 3 of a 12-page contract, {page} resolves to 3 and {total} resolves to 12. Meanwhile, {date} inserts the current browser date formatted with a numeric day, short month name, and four-digit year, avoiding the day-month ambiguity highlighted in IETF RFC 3339 Date and Time Formats.
At least one of Header or Footer must contain text before clicking Add header and footer. If you only want clean sequential numbers without any header string or date token, you can stamp standalone page numbers instead.
Choosing page ranges to skip title or cover sheets
Leaving the Pages field blank stamps every sheet in the PDF. Entering a range such as 2-8 or 2-10, 12 skips cover sheets and standalone appendices while preserving {total} as the full document page count.
Because {page} always reflects the actual 1-based sheet index in the document, skipping page 1 labels the second sheet as page 2 automatically. This keeps legal exhibits and multi-chapter reports consistent with their table of contents.
Font encoding, alignment, and size constraints
Text stamping uses PDF Standard Helvetica (StandardFonts.Helvetica) combined with WinAnsiEncoding as specified in the Library of Congress PDF 1.7 (ISO 32000-1) Format Description. Choosing a built-in PDF typeface keeps output file sizes tiny while ensuring every compliant viewer renders crisp vector text.
Why Standard Helvetica restricts extended Unicode symbols
Before drawing onto any page, the worker checks both Header and Footer strings against the WinAnsiEncoding character table. Standard Western European letters, digits, and punctuation pass cleanly, whereas emoji, Cyrillic, Arabic, or East Asian characters trigger a validation warning.
If you need to store extended UTF-8 keywords, author names, or document titles invisibly in the file properties rather than on the page margin, use the PDF document properties editor instead.
Balancing Small, Medium, and Large text against page margins
| Size option | Point size | Best use case | Character cap per line |
|---|---|---|---|
| Small | 8 pt | Dense legal footers and timestamps | 120 characters |
| Medium | 10 pt | Standard Page {page} of {total} |
120 characters |
| Large | 12 pt | Bold draft notices and titles | 120 characters |
The Alignment dropdown places both lines at Left, Centre, or Right along the top and bottom page edges. Keep strings well under the 120-character cap when using 12 pt text on narrow portrait sheets so long titles maintain clean margin clearance without overlapping page content.
When stamping rotated landscape pages mixed into a portrait packet, the worker accounts for each page’s orientation so headers stay anchored to the visual top edge. Still, verify tight spreadsheets in a viewer afterward to confirm sufficient margin clearance.
Comparing PDF headers and footers versus page numbers and Bates numbering
Choose this tool when every page needs descriptive context alongside numbering, such as a client name, confidentiality notice, or print date. Dedicated page numbering or Bates numbering works better when you need continuous sequential indexing across multiple separate files for legal discovery.
| Feature or constraint | Headers and footers | Dedicated page numbers | Bates numbering |
|---|---|---|---|
| Top and bottom lines | Both Header and Footer | Page number position only | Single corner or margin |
| Dynamic date token | Built-in {date} token |
Numbering tokens only | Prefix and suffix only |
| Multi-file sequence | Single PDF per run | Single PDF per run | Continues across files |
| Page range filtering | Yes (Pages input) |
Yes (Pages input) |
All pages in batch |
Documents destined for long-term government or legal archiving often require PDF/A compliance. Per the Library of Congress PDF/A-1 (ISO 19005-1) Archival Standard, PDF/A forbids unembedded Standard 14 font references, so verify archival rules if your compliance pipeline requires fully embedded font programs.
If your source pages are crooked flatbed scans, straighten skewed scan margins before adding a header or footer so stamped lines sit parallel to the scanned text.
Browser-side stamping and scanned margin safety
All PDF parsing, WinAnsiEncoding checks, and vector text placement execute locally in your browser tab, sending 0 bytes over the network. Processing confidential NDAs, board packets, and tax filings locally removes third-party server retention risks.
Checking dark backgrounds before placing footer text
Stamped Helvetica text renders in solid dark ink near the top and bottom margins. On standard white-background documents, 8 pt to 12 pt labels remain sharp and legible at any zoom level.
Tip: Leave either Header or Footer blank if you only want a single line stamped; you do not need to erase both or enter spaces.
If you are working with dark-themed slides or inverted scans, standard black footer text can blend into dark margins. Reviewing pages with Invert PDF colors (dark mode) or checking margin contrast beforehand prevents unreadable labels.
Keeping confidential drafts inside your browser worker
According to the MDN Web Workers API Documentation, running PDF stream updates inside a dedicated worker thread keeps typing and dropdown controls responsive. Your browser downloads the stamped file immediately after Add header and footer finishes.