Handle rotated pages in an OCR workflow

28 July 2026

A person uses a ruler and pen on a spiral notebook.
Illustrative photograph. Cropped and resized. Photo: “Precise drawing (Unsplash).jpg” — Tamarcus Brown tamarcusbrown / Wikimedia Commons. · CC0 1.0

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 pageStarting observationCandidate actionAcceptance check
1, coverHeading and text already uprightLeave it aloneHeading reads correctly and is still on page 1.
2, formHeading reads sidewaysRotate the derivative a quarter turn in the direction that makes it uprightA field label belongs to its original value and follows the correct preceding label.
3, appendixText is upside downTurn the derivative 180 degreesThe 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 relationshipGround truth you wroteWhat the output saysSame meaning?
One header and one valueYour fixtureThe extractNot run
An empty cell, a rotated region, or a column you markedYour fixtureThe extractNot 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).