How automatic skew detection measures tilted scans
Automatic skew detection renders each page at 0.65 scale in local memory and scans horizontal pixel projections to find the tilt angle between -12 and +12 degrees. Because the pixel buffer stays inside the MDN HTML5 Canvas API reference pipeline on your device, 0 bytes leave your browser.
Local pixel analysis and the ±12 degree range
As soon as you drop a PDF, a progress indicator measures each page in sequence and stores its detected angle. Any page whose tilt measures at least 0.05 degrees counts toward Pages to straighten in the options panel.
When you digitize paper sheets from your webcam or scanner, slight paper-feed slant is common. Measuring angles in 0.1 degree steps catches subtle crookedness without distorting readable layouts or adding raster blur.
Fine-tuning angles with the live alignment grid
Horizontal guide lines spaced every 35 px across the preview stage let you compare text baselines against a true level reference. These preview-only reference lines are never written into the exported PDF file.
Drag the Page correction slider to rotate the preview in real time, or click Set page to 0° to leave a cover page untouched. Toggle between Straightened and Original in the header bar to verify your edit before saving, or click Auto-detect anytime to restore the measured angles.
Keeping output files compact without raster blur
Because the worker never decodes and re-encodes scanned JPEG pages, a 10-page document that starts at 2.4 MB stays nearly identical in byte size after straightening. You avoid the soft, blurry letter edges that happen when other tools re-sample low-resolution scans.
Why lossless content-stream rotation preserves OCR layers
Most web utilities straighten a PDF by converting each page into a bitmap image, rotating the pixels, and re-saving a bloated JPEG-backed PDF. This tool preserves original document objects instead by applying an affine transformation matrix rather than raster recompression.
Centered affine rotation matrices in PDF streams
Under the Library of Congress PDF 1.7 Format Description for ISO 32000-1, PDF content streams support transformation matrices (cm) that rotate coordinate space around the page center. The worker writes a white paper fill behind the rotated stream and clips it to the page boundary using numbers rounded to 6 decimal places.
Because the underlying image XObjects and vector glyph streams are never re-encoded, file size barely changes and sharpness stays identical to the source scan.
Running deskew before optical character recognition
Crooked text lines force OCR engines to guess line breaks and misread characters along slanted baselines. Straightening pages first lets you run optical character recognition on straight lines for cleaner searchable text.
If a PDF already contains an invisible OCR text layer, wrapping the content stream rotates both the scanned image and its text layer together so highlights still align with words.
Comparing deskewing, 90-degree rotation, and cropping
Fixing a crooked scan often requires combining small-angle straightening with coarse orientation or tone cleanup. Choosing the right operation prevents clipped margins, keeps file sizes predictable, and avoids unnecessary raster recompression.
| Task goal | Tool to use | Angle or scope | Effect on original objects |
|---|---|---|---|
| Fix crooked feeder tilt | Deskew PDF | -12° to +12° in 0.1° steps | Lossless stream rotation |
| Fix sideways or upside-down scans | Rotate PDF | 90°, 180°, or 270° | Updates page /Rotate entry |
| Trim dark scanner borders | Crop PDF | Custom margin box | Adjusts visible CropBox |
| Boost faint pencil or toner | Darken PDF | Contrast and background whiten | Re-renders page tone |
| Drop empty backsides | Remove blank pages | Ink percentage threshold | Removes blank page objects |
When a sheet entered the scanner sideways, turn sideways or upside-down pages upright first before fine-tuning tilt here. Cropping trims outer shadows without rotating content, whereas deskewing aligns slanted text lines to a true horizontal axis.
Handling handwritten pages, margins, and multi-page batches
Not every page carries neat horizontal print lines. Understanding how auto-detection treats non-text pages and multi-page scanner batches helps you finish cleanup faster with consistent page alignment.
When auto-detection reports zero degrees
Pages dominated by diagrams, wide tables, signatures, or cursive handwriting may lack clear horizontal baselines, causing auto-detection to report 0.0°. Use the Previous and Next page buttons to inspect those sheets and set the Page correction slider manually against the preview guides.
For long-term preservation, the Library of Congress PDF/A Archival Format Description notes that clean, legible page geometry improves archival usability. Straightening skewed pages before archiving keeps text baselines aligned across every viewer and print driver.
Applying one angle across uniform feeder batches
If an automatic document feeder skewed an entire 30-page contract by the exact same angle, adjust page 1 until the lines sit flat and click Use on all pages. You can also assemble raw scanner exports with a multi-page TIFF to PDF converter first and straighten the combined PDF in one pass.
Reviewing a 30-page batch takes only a few clicks when every page shares the same feeder slant. If 2 or 3 appendix sheets were scanned on a flatbed at a different angle, step to those pages afterward and fine-tune them individually before clicking Straighten.
Tip: Straightening a page near 10 degrees can push outer corners slightly past the page edge; toggle Original and Straightened on dense margins to confirm no text clips.