How to add page numbers to a PDF

Choose the pages to number and how the label should read. The numbering is drawn in this browser and the download is a new PDF named after the source.

Measured here: a five-page 3.3 KB file came back as 8.0 KB with one number per page, about 30 pt inside the corner; every numbered page differed from its source only where the label sits.

  1. Load one PDF. The workbench takes a single file: choosing another replaces it, and a text file is refused with a message while the loaded PDF stays.
  2. Fill in the pages field: leave it empty for every page, or name pages and ranges. 2-4 numbered pages 2, 3 and 4 only, and 5-3 numbered 3, 4 and 5 in that order.
  3. Choose the number format, the start number and an optional prefix. The formats are 1, 2, 3, Page 1 and Page 1 of 10; numbering pages 2-4 from 5 printed Page 5 of 7 through Page 7 of 7.
  4. Pick the position, the text size between 7 and 48 px, and the colour. A prefix is printed in front of the number with a middle dot: Appendix became Appendix · 1.
  5. Press Add page numbers, check the pages, input size and output size, then download: the copy is named after the source, plain5-numbered.pdf for plain5.pdf.

Where the number sits, what the label can say and what is refused

Where the number is placed

Bottom right is the default. Bottom left, top right, top left and Centre are the other choices, and Centre puts the label in the middle of the page. On a 300×400 pt file the mark landed about 30 pt in from the two edges, inside the printable area rather than in the margin.

The label is drawn as a small PNG image on the page, so it adds no font and leaves the text layer of the document alone: in the pixel comparison every numbered page differed from its source only where the number sits.

What the label says

The three formats are 1, 2, 3, Page 1 and Page 1 of 10. In the last one the total is the last number of the run: numbering pages 2-4 from 5 printed Page 5 of 7, Page 6 of 7 and Page 7 of 7.

The start number may be 0 or any whole number above it — starting at 0 put 0, 1, 2, 3 and 4 on a five-page file. A decimal is rounded (2.5 became 3), a negative start is refused with a message, and the number that was used is written back into the field. Text size takes 7 to 48 px, and 200 was corrected to 48 and written back. The colour you pick is the colour of the digits: a red run measured as RGB 248, 49, 49 on the page.

Ranges, damaged files and rotated pages

The pages field takes single pages and ranges in the order you write them: 2-4 numbered only 2, 3 and 4, 5-3 numbered 3, 4 and 5, and a page asked for twice (1,1) is numbered once. A page outside the document stops the run with a message and nothing is written.

A damaged or empty PDF answers with the same sentence the other PDF tools use instead of the reader’s own error, an encrypted file is refused with its own message, and a page that carries a rotation is numbered upright in the corner you chose — a 0/90/180/270 file put the mark in the same visual corner on all four pages.

Recent tools: