A document comes back from the scanner and half of it is on its side. You turn the page in your reader, read it happily, close the file — and the next person to open it finds it sideways again.
That is not a bug in the reader, and the explanation makes the rest of the subject obvious.
Rotation is one number
Every page in a PDF carries an attribute saying how it should be turned when displayed. It holds one of four values — 0, 90, 180 or 270 — and it means “turn this page clockwise by this much before showing it”.
The content underneath never moves. A sideways page is not a page whose text was drawn at an angle; it is an ordinary page with the wrong number attached, or with no number when it needed one.
We measured a document through the whole cycle. The original pages carried rotation 0 and measured 596 × 842 pt — portrait. Rotated 90 degrees, every page carried 90 and reported 842 × 596 — landscape. Rotated back, every page returned to 0 and 596 × 842.
Note what changed: a single value per page, and the reported dimensions that follow from it. Nothing was redrawn. That is the figure above, and it is why rotating a 500-page scan takes the same instant as rotating one page.
Why turning it in your reader does not stick
Most readers offer a rotate button in the toolbar. It almost always changes the view — how this reader is displaying the page right now — without touching the file. Close it and the view is gone, because nothing about the document changed.
That is a reasonable default. A viewer that silently rewrote files you only wanted to look at would be worse. But it is why the fix has to be made and saved, which is what Rotate PDF does: it writes the rotation into the file so every reader, every printer and every colleague sees the same thing.
The quick test for which you are dealing with: rotate, close without saving, reopen. If it is sideways again, you changed the view.
Why scans come out wrong in the first place
A few causes, and they suggest different fixes.
The paper went in the wrong way. A landscape page fed into a portrait feeder is captured as a portrait image containing sideways content. The scanner records what it saw.
Automatic detection guessed. Many scanners try to detect orientation from the text and set the rotation accordingly. On a page of ordinary prose that works well. On a form, a table, a page of figures, or a page that is mostly a photograph, there is little for it to go on, and it will sometimes be confidently wrong.
A mixed batch. One landscape spreadsheet in a stack of portrait reports produces exactly the document where some pages are right and others are not — which is why rotating every page by the same amount is often the wrong instrument.
When only some pages are wrong
This is the common case and the one worth getting right. Rotating the whole document to fix four pages turns the other forty.
Our tool shows page thumbnails and lets you turn them individually, so you can set page 3 to 90 and page 11 to 180 and leave everything else alone — we verified that a per-page instruction of 90 on page two and 180 on page four produced exactly 0, 90, 0, 180 across a four-page file. Work from the thumbnails rather than from a list of page numbers; it is faster and you can see what you are doing.
One practical note: rotation is absolute, not cumulative. Setting a page to 90 means “display this at 90”, not “turn it 90 further”. If a page is already at 90 and you want it upright, you are choosing 0, not 270.
What rotation will not fix
A page that is slightly skewed. Pages scanned at three degrees off true are not a rotation problem — rotation only moves in quarter turns. Straightening a skewed scan is a different operation, and if the content was captured crooked the image itself has to be corrected.
Mirrored pages. A page scanned through the back of a sheet is reversed, not turned. No amount of rotation produces a mirror.
Text that is genuinely drawn sideways. Occasionally a landscape table is placed on a portrait page with the text rotated by the application that made it. The page is correct; its contents are deliberately turned. Rotating the page makes the table readable and everything else sideways. Nothing is wrong with the file, and you probably want the original source rather than a PDF fix.
Rotate before you do anything else
Worth knowing because it saves rework. If a document needs rotating and something else, rotate first.
OCR in particular reads a page in the orientation the file declares. Run it on a sideways page and it has to recognise sideways text, which is exactly the condition recognition is worst at — and you will get a poor text layer that looks like an OCR failure when it was an orientation problem. Fix the rotation, then recognise.
The same applies to cropping: a crop box is set relative to the page as displayed, so cropping before rotating means doing it twice.
The short version
A sideways page is one wrong number, not damaged content. Changing it in a viewer changes the view; changing it in the file changes the document. Fix the pages that are wrong rather than all of them, make the rotation absolute rather than relative in your head, and do it before OCR or cropping.
You can check what your own file declares by opening it after a pass through Rotate PDF — the page dimensions reported by any reader will have swapped, which is the visible side of that single number.