PDF Guides

How to Automatically Fix Sideways and Upside-down Pages in a PDF

Why scanned PDFs end up with rotated pages, how text direction and OCR find the right way up, and how to straighten a whole file without quality loss.

Saizul Amin
Saizul Amin28 Oct 2026 · 3 min read
How to Automatically Fix Sideways and Upside-down Pages in a PDF

How to Automatically Fix Sideways and Upside-down Pages in a PDF

Scan a stack of mixed paperwork and some pages will come out sideways or upside down. Landscape tables, a page fed the wrong way, a receipt turned on the glass: it happens in every office. Rotating pages one by one in a viewer is slow, and some viewers do not even save the change. This guide explains how orientation can be detected automatically and how to fix a whole file with PDF Auto Rotate Pages.

How PDF rotation works

Every PDF page has a rotation setting: 0, 90, 180 or 270 degrees. Readers apply it when they display the page. Changing it does not change the page content, so the fix is lossless: images keep their quality, text stays searchable and the file size stays the same.

Detecting orientation on digital pages

Text in a digital PDF has a direction, stored with each piece of text. If most characters on a page run downwards, the page is sideways. The tool counts the characters in each of the four directions and turns the page so the majority read normally. This is instant and very reliable.

Scans that have been through OCR also have an invisible text layer, so they can be judged the same way.

Detecting orientation on scans

A plain scan is a picture with no text layer. To judge it, the tool renders the page and runs OCR four times: as it is, turned a quarter, upside down and turned three quarters. Text recognition only works well when the text is upright, so the orientation that produces the most confidently recognised words is almost always the right one. This takes a few seconds per page but needs no human attention.

Pages without text

Photos, drawings and blank pages give no clue. They are left as they are, or, if you prefer, landscape-shaped pages can be turned to portrait. That option suits documents where everything should be portrait, but not drawings or photos that are meant to be landscape.

Charts and mixed pages

A page may contain text in two directions, such as a chart with a vertical axis label. The tool goes with the direction most of the text uses, which is normally correct. The report lists how each page was judged, so you can check the unusual ones.

A good workflow for scanned batches

  1. Scan everything in one go, without worrying about orientation.
  2. Remove blank and duplicate pages.
  3. Run auto rotate with OCR checking on.
  4. Run OCR on the straightened file to make it searchable.
  5. Split or rename documents as needed.

Example

A 48-page council planning file was scanned with six sideways tables and two upside-down pages. Auto rotate turns all eight upright: three are judged from an existing OCR layer, five by OCR in four directions. The file size does not change, and the planning officer can read it straight through.

Preventing rotated scans

Most rotation problems start at the scanner. Feed pages in the same direction, set the scanner's own auto-orientation option if it has one, and scan landscape tables with the long edge first. Even then, a final automatic pass catches the pages that slip through, so it is worth making it a standard step.

Why rotation in a viewer often does not stick

Many PDF viewers rotate only the view on your screen. When you close and reopen the file, the pages are sideways again, and colleagues see the original orientation. Changing the page's rotation setting in the file, as this tool does, fixes it for everyone.

Limits

The OCR check uses English recognition, which also works on most Latin-alphabet languages. Handwriting, very short pages and other scripts may not be detected; rotate those manually with a rotate tool.

Privacy

The detection and rotation run entirely in your browser. Nothing is uploaded.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages