A header and footer PDF editor adds one optional header line and one optional footer line to every page of an existing PDF, all processed locally in the browser without uploading the source file. The Header Footer PDF tool draws centered text using the embedded standard Helvetica font, measures each line, and saves a new PDF that keeps the original filename base plus -header-footer.pdf. Because the source and generated bytes never leave the browser, the workflow is suitable for documents that cannot be sent to a third-party server — confidential drafts, internal reports, legal filings, or branded material still under review. Headers and footers remain a common request even though PDF was originally designed to be non-editable: people want page numbers, filenames, confidentiality lines, and revision tags applied to every page in one pass, and a focused header and footer editor is the simplest way to deliver that without paying for full desktop publishing software. The browser-based approach also avoids signups, watermarks, and re-uploading, which matters when the document is sensitive or simply large.

header and footer pdf editor
header and footer pdf editor

How the Editor Stamps Text on Every Page

When the user opens the tool, they pick a local PDF, enter one or both text fields, choose a font size and an edge margin, and click a button to create the file. The browser loads the PDF directly, walks through each structural page, draws the header line below the top edge by the chosen margin, and draws the footer line above the bottom edge by the same margin. Standard Helvetica is embedded once and reused for every line, which keeps the file size modest and keeps the output predictable across PDF readers. The implementation uses pdf-lib's drawText method on each page object with StandardFonts.Helvetica embedded once for the whole document. Existing page boxes, page order, painted content, and the original page count are all preserved. The new lines are written as real PDF content, not as a viewer overlay, so the text remains in place when the file is opened, printed, or shared.

Page Number Tokens: The Shortcut Built In

The two tokens the editor recognizes are {page}, which becomes the one-based current page number, and {pages}, which becomes the total structural page count of the source document. A footer such as Page {page} of {pages} therefore renders as Page 2 of 5 on the second page of a five-page file. Token replacement is deterministic and applies only when the exact lowercase string {page} or {pages} appears anywhere in the header or footer text; other brace content is left as-is. Numbering always begins at one and the total always reflects the document before any header or footer is added, so there is no cover-page exclusion, no Roman-numeral mode, no starting-number offset, and no separate left and right alignment. If those features matter, a desktop publishing application that supports section-specific numbering is the better fit.

TokenBecomesExample inputRenders on page 3 of 7
{page}Current one-based page numberPage {page}Page 3
{pages}Total structural page countof {pages} pagesof 7 pages
{page} of {pages}Combined current/totalPage {page} of {pages}Page 3 of 7
  1. Choose a local PDF no larger than 25 MiB using the file picker. The file must be a non-empty PDF; encrypted, damaged, unsupported, oversized, or incorrectly labeled files produce a visible error rather than a partial result.
  2. Enter the header text, the footer text, or both. Each field is trimmed and capped at 120 Unicode characters. Use {page} and {pages} where a number should appear.
  3. Set the font size as a whole number between 6 and 36 points and the edge margin as a whole number between 0 and 200 points, then select Add header and footer. The new file downloads with the source filename base plus -header-footer.pdf.

Changing any setting revokes the previous download so a stale file cannot be mistaken for the current configuration. If a line would exceed the usable page width at the chosen font size, the editor reduces the size one point at a time down to a 6-point floor rather than stretching, wrapping, or silently deleting the text.

Size, Margin, and Text Limits You Can Adjust

The accepted controls are deliberately small in number, which keeps the output consistent and easy to verify. Header text is positioned below the top edge by the chosen margin and the requested font size, while footer text begins above the bottom edge by the same margin. Both lines are horizontally centered from the real text width measured with the embedded standard Helvetica font. Each text field is trimmed and limited to 120 Unicode characters. Standard Helvetica supports a practical Latin character set but not every writing system or emoji; if a glyph cannot be encoded the editor fails visibly rather than substituting a missing-glyph character.

ControlAllowed rangeBehavior at the limit
Font size6–36 points (whole)Reduced one point at a time to a 6-point floor if the line overflows
Edge margin0–200 points (whole)Header sits below the top edge; footer sits above the bottom edge
Header text length≤ 120 Unicode charactersTrimmed before drawing
Footer text length≤ 120 Unicode charactersTrimmed before drawing
Source file sizeUp to 25 MiBLarger files rejected with a visible error

Very narrow pages or excessive margins can leave little usable space, so inspecting the result before printing or distribution is recommended.

  • Confidentiality notices — a line such as CONFIDENTIAL — DRAFT stamped on every page of an internal document.
  • Filenames and revision tags — printing the source filename and a revision name at the bottom so loose pages can be reassembled later.
  • Page numbering — the classic Page {page} of {pages} pattern at the bottom of every page.
  • Distribution labels — adding a recipient name or routing code so each printed copy can be tracked.
  • Branding headers — repeating a short company name or document title at the top of every page without modifying the body.

Each of these is straightforward enough that the editor's fixed rules — centered lines, uniform content, Helvetica only, no images, no multi-line text — cover them cleanly.

What This Editor Will Not Do

The tool does not create multi-line headers, embed images, support different odd/even content, do section-specific or Bates numbering, render dynamic dates, embed rich fonts or hyperlinks, or make any archival-conformance claim. It does not detect a safe margin, move body content, avoid logos or crop marks, read document language, or create white space — content already near an edge can overlap the chosen line, so the editor is best suited to documents with a clear margin around the top and bottom of every page. The new text is drawn on every structural page; there is no cover-page exclusion. For multilingual branding, custom fonts, or precise typography, a desktop publishing application that can embed the required licensed font remains the right choice. For a longer walkthrough of the same tool, see Add Header and Footer to a PDF in Your Browser, and for a focus on the local-only workflow, see Header and Footer PDF Download: Add Text and Save Locally.