Handle rotated pages in an OCR workflow
28 July 2026
Correct orientation page by page on a working copy. An upright cover, a sideways form and an upside-down appendix need different treatment. Rotating the entire PDF to fix the form can turn two other pages the wrong way.
Record a correction against the source page
| Example page | Starting observation | Candidate action | Acceptance check |
|---|---|---|---|
| 1, cover | Heading and text already upright | Leave it alone | Heading reads correctly and is still on page 1. |
| 2, form | Heading reads sideways | Rotate the derivative a quarter turn in the direction that makes it upright | A field label belongs to its original value and follows the correct preceding label. |
| 3, appendix | Text is upside down | Turn the derivative 180 degrees | The first and last lines match the corresponding source page in reading order. |
Check how the OCR engine interprets the actual raster and any page rotation setting. A viewer may display the page upright while the recognition step receives it in another orientation. Keep the original bytes and the source-to-output page mapping.
Run recognition, then check the text against the image
Record the language, engine and settings used. Compare recognisable words and critical identifiers with an independently read source page. A correct list of words in the wrong column order can still change the meaning. Where the direction of a sparse diagram or stamp is uncertain, flag that page for review rather than applying a guess across the batch.
The local OCR error table measured a separate eight-degree skew case. That case missed its four target search terms. The quarter-turn and half-turn rotations above require separate tests. Use the exercise to establish your own observed outcomes. Record the orientation chosen, extracted text, reading-order result and outstanding exceptions for each page before releasing the searchable copy.
Part of the OCR software for business: how to choose and test it guide.
Handle rotated tables in PDF documents
This section answers a narrower question than the rest of this page, and it does not mint a new URL. The original contribution preserved here is a table ground-truth dataset with cell and structure error checks.
Write the table you expect before you look at the output.
| Cell or relationship | Ground truth you wrote | What the output says | Same meaning? |
|---|---|---|---|
| One header and one value | Your fixture | The extract | Not run |
| An empty cell, a rotated region, or a column you marked | Your fixture | The extract | Not run |
Do not let a fluent table bless a shifted column.
The rest of this page remains the parent decision. Use the table for the question in the heading, and leave a cell blank rather than filling it from memory.
Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).
