Inspect PDF page sizes and rotation: compare document and display coordinates

Inspect a mixed-size three-page PDF before and after page 2 rotation. Compare MediaBox, CropBox and display size, then export JSON or CSV.

Example and verification evidence

Verified on
2026-10-14
Execution environment
Node v24.14.0 on win32/x64
Reproduction command
cd tools/blog-verification && npm ci && npm test && npm run verify
Result summary
Existing sample evidence: 3 pages; page 2 rotation 0° to 90°; MediaBox dimensions retained and display width/height swapped.
Limitations
Sample file geometry only. This record does not verify every browser, signatures, forms, readable content or safe printing.
View example and verification JSON

Distinguish display orientation from document coordinates

If a merged report prints in an unexpected orientation, inspect its page sizes and rotation first. Compare two versions of the same three-page document: two A4 portrait report pages followed by one Letter landscape appendix. The rotated version turns only page 2 by 90 degrees.

1. Prepare the comparison files

Download original sample (PDF) Download page 2 rotation sample (PDF)

Both files retain the labels REPORT PAGE 1, REPORT PAGE 2, APPENDIX PAGE 1 in that order. Check labels and page counts first.

Rendered sample PDF with page 2 rotated 90 degrees; this is not a screenshot of the inspection tool
Rendered sample PDF with page 2 rotated 90 degrees; this is not a screenshot of the inspection tool

2. Read the document with Page Inspect

Open PDF Page Inspect

  1. Select merged.pdf and confirm it contains three pages.
  2. Read each page's MediaBox, CropBox, raw rotation and display dimensions. These samples use UserUnit=1, so coordinate dimensions equal points (pt).
  3. Select rotated-page-2.pdf as a new file and compare page 2.
  4. Export JSON or CSV to compare the measurements. These exports contain inspection data; they do not create a modified PDF.

3. Expected measurements

On mobile, swipe the table horizontally to reach the last column. With a keyboard, press Tab to focus the table, then use the left and right arrow keys.

Before and after rotation of the same three-page input
File and pageMediaBox / CropBox (pt)Raw rotationDisplay size (pt)
merged.pdf pages 1–2x=0, y=0, 595.28 × 841.890°595.28 × 841.89
Both files, page 3x=0, y=0, 792 × 6120°792 × 612
rotated-page-2.pdf page 1x=0, y=0, 595.28 × 841.890°595.28 × 841.89
rotated-page-2.pdf page 2x=0, y=0, 595.28 × 841.8990°841.89 × 595.28

MediaBox describes the page's document coordinate extent; CropBox describes the viewer's visible region. These samples have no separate crop, so the boxes match. Other PDFs can use different origins and sizes. Rotating page 2 changes display orientation without rewriting its MediaBox width and height. If another document uses UserUnit other than 1, do not interpret its raw coordinates as points. The inspector calculates display dimensions from the intersection of MediaBox and CropBox with rotation applied.

Interpret the inspection limits

Page counts, boxes and rotations do not establish correct printing or readable content. The inspector does not verify signatures, forms, OCR, accessibility tags, content accuracy or malicious-file safety. Encryption, damage or insufficient memory can prevent inspection. Keep the original and check a viewer and the actual printout too.

The linked manifest is the existing reproduction record for the supplied samples' counts, dimensions, rotations and file hashes. It does not establish support for every browser in the new inspection screen.

Back to Blog