PDF Tools

PDF Orientation Checker

Detect portrait, landscape, and square pages in any PDF — with thumbnails, exact dimensions, paper size names, and rotation angles. No upload. 100% private.

Total Pages
Portrait
Landscape
Square
No pages in this PDF.
# Dimensions Size Orientation Rotation

About PDF Orientation Checker

Mixed-orientation PDFs — documents where some pages are portrait and others are landscape — are common in reports, presentations exported to PDF, or scanned documents. Identifying which pages need rotating before printing or merging can save significant time and paper waste.

This tool analyses every page of your PDF directly in the browser using PDF.js. It renders a thumbnail of each page and reports the visual orientation (portrait, landscape, or square), the exact dimensions in PDF points, the closest standard paper size (A4, Letter, A3, etc.), and the page's built-in rotation angle. Everything runs client-side — your file never leaves your device.

How to Use

  • Upload — Drag and drop a PDF onto the drop zone, or click "Browse PDF file" to select one from your device.
  • Analysis — The tool processes each page sequentially. A progress bar and thumbnail grid appear as each page completes.
  • Summary cards — Click a card (Portrait / Landscape / Square) to filter the grid to only those pages.
  • Grid / List toggle — Switch between a visual grid with thumbnails or a compact list view showing all pages in a table.
  • Export CSV — Download a spreadsheet with page number, width, height, orientation, rotation, and paper size name for every page.
  • New PDF — Click "New PDF" to reset and analyse a different file.

Logic & Algorithm

The tool uses PDF.js (pdfjs-dist@3.11.174) to parse the PDF binary in-browser. Processing works page-by-page:

  • Dimension extractionpage.getViewport({ scale: 1 }) returns the page's visual width and height in PDF user units (points, where 72 pt = 1 inch). This call automatically applies the page's built-in /Rotate value, so the dimensions reflect what the viewer renders, not the raw MediaBox.
  • Orientation detectionwidth > height → Landscape; height > width → Portrait; width === height → Square.
  • Rotation reportingpage.rotate exposes the explicit PDF rotation (0, 90, 180, or 270°). A page showing as landscape because of a /Rotate 90 annotation will have its portrait native dimensions but correctly report a 90° rotation.
  • Paper size identification — Detected dimensions are compared against standard sizes (A5, A4, A3, A2, B5, B4, Letter, Legal, Tabloid) using a ±3 pt tolerance to allow for rounding in PDF exporters.
  • Thumbnails — Each page is rendered onto an off-screen <canvas> at a scale of 130 / max(width, height) so the longest dimension is ≤ 130 px. The canvas is exported as a JPEG data URL at 0.75 quality. The pdfjsLib document object is kept outside the Alpine proxy to prevent serialisation errors.