tooldura
PDF Tools

PDF Page Numbers: The One on the Page and the One in the Page Box

T
tooldura editorial
8 min readUpdated November 8, 2026Open tool →

A report has a cover, a contents page and then page 1. Someone on a call says "turn to page 12", you type 12 into the box at the top of your PDF reader, and you land on a page whose footer says 10. Both numbers are correct, they just count different things. The footer is text drawn on the page. The box counts pages from the start of the file, unless the file tells it otherwise through a feature most PDFs never use. Getting the two to agree, and getting the printed number into the right place on every page, takes a little more than drawing a digit at the bottom of each sheet.

Two Numbers That Never See Each Other

ISO 32000, the PDF standard, gives every page a fixed page index, counting from 0, which is simply its position in the file. A number in a footer has no connection to it. To a reader it is a few glyphs like any others on the page, and no reader looks at them to decide what the page is called.

What a reader shows in its page box comes from page labels, defined in section 12.4.2 and available since PDF 1.3. The standard's own example is a document with 12 pages of front matter in roman numerals: page index 11 is labelled xii and page index 12 is labelled 1. Without labels, the reader falls back to counting, so the thirteenth page is 13 whatever its footer says.

That is why adding numbers to a PDF is two separate jobs. Drawing them makes them visible on screen and on paper. Writing page labels to match makes the page box, the "go to page" command and the page names in a reader's thumbnail panel use the same numbers. Most numbering tools do only the first.

How Page Labels Are Stored

Labels live in the document catalog under PageLabels, as a number tree. Each key is the page index where a new numbering range begins, and the tree must have an entry for index 0. Each value is a small dictionary with three optional entries: S for the numbering style, P for a prefix, and St for the number of the first page in the range, which must be 1 or more and defaults to 1. Every page after the start of a range counts up from there until the next range begins.

The standard's worked example labels nine pages i, ii, iii, iv, 1, 2, 3, A-8, A-9 with just three entries: lowercase roman from index 0, decimal from index 4, and decimal with the prefix A- starting at 8 from index 7.

One detail of S is easy to miss. It has no default. A range without a style has no numbers at all, and every page in it is labelled with the prefix alone, so a range whose prefix is Contents calls every one of its pages Contents. With no prefix either, the label is empty.

The Five Numbering Styles

Values of the S entry in a page label dictionary (ISO 32000-1, 12.4.2), with the labels each produces for the first pages of a range.

SStylePages 1, 2, 3, 27
DDecimal arabic numerals1, 2, 3, 27
RUppercase roman numeralsI, II, III, XXVII
rLowercase roman numeralsi, ii, iii, xxvii
AUppercase lettersA, B, C, AA
aLowercase lettersa, b, c, aa
(none)Prefix onlythe prefix on every page

Why the Page Box Should Match the Paper

Mismatched numbers are a small annoyance for most readers and a real obstacle for some. The W3C's WCAG technique PDF17, Specifying consistent page numbering for PDF documents, exists for exactly this: its goal is that the numbering a PDF viewer displays in its page controls matches the numbering of the document. Its test is to compare the page box with the number on the page for each section of the document, and with a screen reader, the number announced by the navigation against the one read out from the page. The technique supports WCAG success criterion 1.3.1, Info and Relationships, and is listed as advisory for 2.4.8, Location.

The practical case is any document people cite by page: a contract with a cover sheet, a thesis with a roman-numbered preface, a manual quoted in support tickets. If page 7 in the footer is page 9 in the box, every reference has to be translated by whoever follows it.

🔢

A label range that Acrobat Reader may ignore

St is optional in the standard, and a decimal range without it should start at 1. A thread on Adobe's own community forum reports that Acrobat Reader ignored a file whose only range was decimal with no St, and showed its default numbering instead, while the same range with St 1 written out was displayed as expected. Writing St on every range costs a few bytes and avoids the problem, which is what Add Page Numbers does.

Where the Number Goes

For a document read on screen or printed on one side, the bottom centre is the safe default. It stays clear of the binding on either side and of the running headers many documents carry at the top.

A document printed on both sides and bound is different. Open a book and the right-hand page carries the odd number and the left-hand page the even one, so a number in the outer corner sits on the right of odd pages and the left of even ones. That is what the Alternate sides option does: odd printed numbers take the corner you chose and even ones take the opposite corner. It follows the printed number rather than the position in the file, so if you skip a cover and start at 1, page 1 still lands on the right.

The distance from the edge matters more on paper than on screen. Many office printers cannot print right up to the edge of the sheet, so a number placed only a few millimetres in can come out clipped or missing. The tool starts at 12 mm, a little under half an inch, and lets you move it anywhere from 4 to 40 mm.

Landscape and Cropped Pages

Two kinds of page catch out tools that place numbers by the raw page size.

The first is a landscape page stored as a portrait one. Section 7.7.3.3 of ISO 32000-1 lets a page carry a Rotate value, the number of degrees it is turned clockwise when displayed or printed. Spreadsheets and scans often arrive this way: an A4 portrait page with Rotate 90, shown as landscape. A tool that writes its number at the bottom centre of the stored page puts it on what the reader shows as the left edge, running up the side. To land at the bottom of the page as displayed, the position has to be worked out on the turned page and then mapped back, and the text itself drawn turned the other way so that it reads left to right.

The second is a cropped page. A reader shows the crop box, clipped to the media box, not the whole sheet. Scanners and imposition software often leave a wide media box with a crop box inside it, and a number placed 12 mm from the edge of the media box can fall outside the visible area entirely, present in the file but never seen. Measuring from the edge of the crop box puts it where the reader can see it.

Add Page Numbers handles both, and its test suite checks them with a separate reader, pdf.js: on pages rotated 90, 180 and 270 degrees, including one that inherits its rotation from the page tree, and on a page whose crop box is smaller than its media box, every number has to come back upright and within half a point of where it was asked to go.

Number your PDF

Pick a corner or the centre, skip the cover, start at any number, and make the reader's page box agree with the paper.

Open Add Page Numbers →

Why the Numbers Use Helvetica, Times or Courier

Text in a PDF has to name a font, and a font that is not inside the file has to be found by the reader. ISO 32000-1 names 14 standard Type 1 fonts in section 9.6.2.2, the Times, Helvetica and Courier families in four styles each plus Symbol and ZapfDingbats, which a PDF reader is expected to supply itself. Using one of them means the numbers add almost nothing to the file size and look the same in every reader.

The cost is the character set. This tool writes those fonts with WinAnsiEncoding, one of the encodings listed in Annex D of the standard and the same set as the Windows-1252 code page: plain ASCII, the accented letters of Western European languages, and a handful of typographic marks such as curly quotes and dashes. Romanian ș, Polish ł, Greek or Cyrillic are outside it, so a custom format that uses them is refused before the file is saved, and the tool names the character it cannot draw.

The other cost is archival. PDF/A, the ISO 19005 family for long-term archiving, requires every font used in a file to be embedded in it, the standard 14 included. A PDF/A file numbered this way still displays correctly but no longer passes a PDF/A validator. For an archive copy, number the document in the program that made it, then export to PDF/A.

Before You Number a PDF

A few minutes of checking avoids the most common ways a numbered file goes wrong.

1

Look for numbers that are already there

Files exported from Word or Google Docs often have footer numbers already, sometimes only on some pages. Step through the preview first, or the new numbers will sit next to the old ones.

2

Decide what the cover counts as

Skipping the cover and starting at 1 gives the first page of content the number 1. Skipping it and starting at 2 keeps the count matching the position in the file. Either is fine, as long as the contents page agrees.

3

Number before signing

A digital signature covers the exact bytes of the file, and drawing on the pages changes them. Number the final version first and sign the numbered file.

4

Keep the original

Drawn numbers become part of each page's content and cannot be switched off afterwards. If you may need a different layout later, number again from the unnumbered file.

Frequently Asked Questions

Found this guide useful? Pass it on.

Related Tools

Keep Reading