PDF · 37 tools · nothing uploads

PDF page labels

Give the whole document a numbering style: i, ii, iii or A, B, C instead of 1, 2, 3.

Input

PDF page labels writes a /PageLabels number tree into the catalog, so your reader's page box shows iii where it showed 3. Pick one of five styles, a first label, and a prefix. Point at the page your body starts on and the count restarts there, so front matter stays roman while the body reads 1, 2, 3.

Questions

What does this change in the file?

The /PageLabels number tree in the document catalog, written directly, since pdf-lib has no high-level API for it. Nothing is drawn on any page. What changes is the label your reader shows in its page number box and beside its thumbnails, so page 3 can read iii or C instead.

Which numbering styles can I pick?

Five: decimal, lower-roman, upper-roman, upper-alpha and lower-alpha, mapping to the PDF spec's D, r, R, A and a. Decimal is the default. There is no option for no label at all. Two runs are supported, so front matter and body carry different styles.

Can I have roman numerals for the front matter and decimal for the body?

Yes. Click the page your body starts on and a second run begins there with its own style, first label and prefix. Front matter reads i, ii, iii while the body reads 1, 2, 3. Two runs is the limit: a scheme with three or more needs a full PDF editor.

What does the prefix do?

It puts a fixed string in front of every label, so a prefix of Draft- with decimal style gives Draft-1, Draft-2 and so on. Leave it blank and no prefix entry is written into the file at all. It is stored once per run, not per page, and written as a PDF string so readers accept the tree.

Why was my start value rejected?

Because it has to be a whole number of 1 or more, and it says so: "start must be a whole number of 1 or more". Zero and negative starts are refused because the PDF page label counter is defined as starting at one or higher. The start applies to the first page and the labels count up from there.

Will the labels show up when I print?

No. Nothing is added to the page content, so a printed sheet looks exactly as it did before. Labels live in the document structure and are for on-screen navigation. If you want numbers on the paper, use Add page numbers, which draws them at the bottom of each page.

Compare

ToolRuns on the CLILive as you type
PDF page labelsYesNo
Add page numbersYesNo
Add header/footerYesNo
Add watermarkYesNo
Bates numberingYesNo
Sign PDF (draw or image)YesNo

Related PDF tools