Skip to content
yutils
Example

Input

File: scan.pdf (10 pages, scanned landscape)
Angle: 90°, Scope: All

Output

scan-rotated-90.pdf (10 pages)
→ All rotated 90° clockwise

Note

Rotation accumulates — a page already at 90° + 90 → 180. The original file is left untouched.

Usage / FAQ

When to use

  • Fix a landscape scan back to portrait
  • Batch-correct phone-camera scans with wrong orientation
  • Rotate a landscape deck for portrait printing
  • Rotate selected pages only (e.g. appendix tables)
  • Re-rotate a previously rotated PDF back to original

FAQ

Q.How are already-rotated PDFs handled?
A.Current rotation + applied angle. A page at 90° + 90 = 180. + 270 = 0 (back to original).
Q.What about unselected pages?
A.Untouched. Content, fonts, and images of non-rotated pages remain identical to the source.
Q.Does rotation break text search / selection?
A.No. Only the PDF's rotation metadata changes — the text layer and selectability are preserved.
Fun facts
  • PDF page rotation just toggles the page object's /Rotate key — only 0/90/180/270 are valid. Actual content coordinates stay; the viewer applies rotation at display time. That's why rotation is virtually free.

    ISO 32000-1 §14.8 (Pages — Rotate)
  • Landscape-printed PDFs are surprisingly common — sheet feeders that pass paper sideways. The receiver shouldn't rotate the monitor; rotate the PDF instead.

    Wikipedia — Image scanner
  • OCR results and selectable text survive rotation because PDF text is stored as vector coordinates, independent of rotation metadata. The viewer only applies the rotation at render time.

    pdf-lib