Change PDF page numbering to roman numerals
Page labels are the page numbers a PDF viewer displays in its toolbar and thumbnails — they can be roman numerals for front matter (i, ii, iii), prefixed labels like A-1, or numbering that restarts at each chapter, independent of the physical page count. This tool writes real /PageLabels entries into your PDF from simple "from-page | style | prefix" lines. It changes what the viewer shows, prints nothing on the pages, and runs entirely in your browser.
How it works
The PDF specification stores display numbering in a structure called the /PageLabels number tree, attached to the document catalog. It is a list of ranges: each entry names a starting physical page index, a numbering style, an optional text prefix, and an optional starting value. A viewer that honors it walks the tree to decide what to show in the page box — so physical page 4 can be displayed as "iv", "A-2" or "Chapter 3, p. 1" without a single mark on the page itself.
This tool builds that tree from the lines you type. Each line has the form from-page | style | prefix: the physical page where the range begins, one of six styles — decimal (1, 2, 3), roman (i, ii, iii), ROMAN (I, II, III), letters (a, b, c), LETTERS (A, B, C) or none for prefix-only labels — and an optional prefix string. Numbering restarts at 1 at the beginning of every range, which is exactly how books work: front matter counts i, ii, iii and the body starts over at 1. The tool converts your lines into the corresponding number-tree dictionary (styles map to the spec's /D, /r, /R, /a, /A values, prefixes to /P strings) and writes it into the catalog, replacing any labels the file already had.
Two things follow from the mechanism. First, this is metadata, not ink: if you need numbers readers can see on paper, that is a different operation — use add page numbers to draw them onto the pages. Second, display depends on the viewer. Acrobat, Chrome and Firefox all read /PageLabels and show "iv (4 of 120)"-style numbering; some lightweight and mobile viewers ignore the tree entirely and count 1, 2, 3. The labels are standard PDF structure either way, so nothing breaks in viewers that skip them.
Illustrative example: a thesis with front matter and appendices
Illustrative scenario, not a recorded benchmark. File sizes, timings and results depend on the input and device. Try the reproducible samples.
A 96-page thesis PDF (2.3 MB) has a title page and table of contents on physical pages 1–8, the body on pages 9–88, and appendices from page 89. Three lines describe it: 1 | roman, 9 | decimal, 89 | decimal | A-. After processing, viewers display pages 1–8 as i–viii, page 9 as 1 (the body restarts), page 88 as 80, and pages 89–96 as A-1 through A-8. The file size grows by under 1 KB — the entire number tree is a few dictionary entries. A reader told to "see page 45" by the printed thesis now lands on the right page when they type 45 into Acrobat's page box, instead of arriving eight pages early.
Frequently asked questions
Do page labels print anything on the pages?
No. Page labels only change the page number a viewer displays in its toolbar and thumbnail panel; the page content is untouched. To place visible printed numbers on the pages themselves, use a page numbering tool instead.
How do I make the first pages show i, ii, iii and then restart at 1?
Enter two lines: "1 | roman" for the front matter and, say, "7 | decimal" where the body begins. Pages 1–6 will display as i–vi, and page 7 will display as 1, because numbering restarts at the start of every range.
Which PDF viewers actually honor page labels?
Adobe Acrobat and Acrobat Reader, Chrome's built-in viewer and Firefox's PDF viewer all display page labels; several lightweight or mobile viewers ignore them and show plain 1, 2, 3. The labels are stored in the standard /PageLabels entry, so support depends only on the viewer.
What label styles can I use?
Six styles per range: decimal (1, 2, 3), lowercase roman (i, ii, iii), uppercase Roman (I, II, III), lowercase letters (a, b, c), uppercase letters (A, B, C), or none, which shows only the prefix. Each range can also carry a text prefix such as "A-" to produce labels like A-1, A-2.
Why would a citation say page iv when my printout says page 4?
Documents with front matter often label their opening pages with roman numerals, so the fourth physical page is displayed as iv while a plain counter calls it 4. Page labels bring the viewer's displayed numbers back in line with the numbers printed in the book or report.