Count a PDF range without counting a page twice
Admin ·
Confirm how many physical pages a PDF contains, then count a specific section. Keep the source total visible when page ranges overlap or the document uses printed numbers that start after a cover.
Count all five physical pages and a selection
Select Load example and Count PDF pages. The handout contains five physical pages. Pages to count starts with 2-4, 2. The selection has pages 2, 3 and 4. The repeated 2 adds no extra row.
The selected total is three, with one odd and two even pages.
| Physical page | Parity | Rotation | Visible size (pt) |
|---|---|---|---|
| 2 | Even | 90° | 680 × 480 |
| 3 | Odd | 0° | 300 × 420 |
| 4 | Even | 0° | 300 × 420 |
Download the five-page handout PDFAdobe PDF reference for page trees, page objects and default user space
Read the rotated page and change the range
On page 2, a UserUnit of 2 scales the 240 × 340 user-unit crop to physical points. The saved 90° rotation swaps width and height, giving a displayed 680 × 480 pt rectangle.
Clear Pages to count. The selected total changes to five, with three odd and two even pages. The document total stays at five.
Download the five-page handout PDFAdobe PDF reference for page trees, page objects and default user space
Verify the saved counts and geometry
Enter 2-4, 2 and download the count summary. It lists all five document pages, three selected pages and positions 2, 3 and 4. Download the CSV when you need the per-page rotation, scale or visible dimensions.
Open pdf-page-count.csv in a table editor and check for three data rows. A blank geometry value accompanied by a finding means that the page counted but that value was unavailable.
Download the five-page handout PDFRFC 4180 common CSV format and media type
Common questions
Does the PDF page count include the front cover?
Yes. A cover stored as a page in the PDF has a physical position, just as a blank or printed page does.
Does the CSV contain the document text?
It records numerical counts, parity, geometry and any page findings. The text report lists the summary and physical positions.