Scans

Why scanned PDFs fail OCR, and the four fixes that work

OCR produces nonsense in a way that feels like a failed tool. The scan looks readable on screen, so the suspicion lands on the software. In practice the text is usually failing one of a short list of physical tests before any recognition runs: it is too small on the page, it is crooked, something is sitting between the camera and the paper, or the file is in a language the engine was not told to expect.

All four are diagnosable, and three are fixable before you try again.

First, check what you actually have

Before changing anything, confirm the file has no text. Open it in a PDF viewer and try to select a word with the mouse. If it highlights, there is already a text layer and OCR is not your problem — you are looking at a rendering or font issue instead. If the whole page drags as one blue block, or nothing selects at all, the page is an image and OCR is the right tool.

Cause 1: the text is too small

OCR does not read a page the way you do. It looks at pixels, and a character needs a certain number of them before its shape is unambiguous. Around 10–12 pixels of character height is where recognition becomes reliable; below that, rn becomes m, l becomes 1, and a full stop disappears.

The scan itself may already be low resolution — a fax, a photocopy of a photocopy, or a photo taken far from the page. You cannot add detail that was never captured, but you can stop throwing detail away. Run OCR at a higher target resolution than you think you need. Going from 150 to 300 dpi produces four times the pixels across the same letter and is the single largest quality jump in the process.

There is a ceiling worth knowing about. Rifinit's OCR renders each page at the requested resolution, then caps the rendered bitmap around seven million pixels per page so a large scan cannot exhaust memory on a small server. A 300 dpi A4 page sits comfortably under that cap; an A0 poster at 300 dpi does not, and the engine will quietly render it lower. If you are OCR-ing unusually large pages, that is the reason a high setting did not help.

Cause 2: the page is crooked

A page tilted by two degrees looks fine to a human and confuses a projection-based recogniser. Text lines are supposed to be horizontal rows of ink; the engine searches for rows with the most consistent alignment. Tilt smears each row across its neighbours and the search finds nothing.

This is the most common cause with phone photos, because a phone held over a document is almost never level. Straighten it first. Rifinit's Deskew reads the tilt from the ink itself rather than from a text layer, which matters here: a scan has no text layer or the deskew stage could not run before the OCR. It rotates a small grey copy of the page through a range of angles and keeps the one whose rows line up best.

That also explains the one legitimate reason to leave a tilt alone. If a page is deliberately set on a slant — a cover page, a stamp, a letterhead — auto-straightening will rotate it back. Both Rifinit's deskew and its OCR take a page range, so send the text pages and skip the cover.

Cause 3: a shadow, a fold, or a finger

A shadow across the page is not a mild problem. Recognition thresholds darken and lighten ink, and a gradient across a sentence can push half of it below the threshold in one place and wash the other half out. A fold line or a finger at the edge does the same damage in a narrow strip.

Fix the capture where you can: even, diffuse light, no direct lamp casting a shadow of your hand, the page held flat. Where you cannot recapture, crop to the clean area, raise contrast, and accept that a line running through a shadow may be lost. No OCR setting recovers text that was never imaged legibly.

Cause 4: the wrong language

OCR engines are trained per script. Tell an English model that a page is German and it will confidently read ß as ß or drop the umlaut; leave a Cyrillic or Devanagari page on the default and it returns plausible-looking Latin nonsense for every line, which is worse than an empty result because it looks like content.

Set the language to match the document. For a document mixing two languages on the same page, load both and expect a slightly higher error rate — the engine has to decide per character group, and short groups are where it guesses.

A working order

  1. Check for an existing text layer — select a word. If it highlights, stop.
  2. Deskew first, not after. OCR reads what it is given.
  3. Set the language before the resolution. A wrong language at any dpi returns wrong words.
  4. Raise the resolution to 300 dpi for ordinary pages.
  5. OCR the text pages only, so a cover or a blank does not contribute noise.
  6. Verify: search the result for a distinctive word you can see on the page. If it is not found, the text layer did not land where you think it did.

What OCR will never fix

Honest limits, so a failed result does not send you hunting for a setting that does not exist:

  • Handwriting. Print-tuned engines misread it as noise or skip it. Expect a machine-typed page; a filled-in form is a coin flip.
  • Rotated or upside-down pages. Straighten and rotate to upright before OCR; a page turned 180° is not "slightly tilted".
  • Text smaller than about 6 pt on the paper. There is not enough detail in the scan, whatever the dpi setting says.
  • Decorative or heavily outlined type, which has no consistent stroke for the engine to match.

The general rule: OCR quality is decided by the image, and the settings only control how much of the image reaches the recogniser. Fix the page, then run it.

Alex Roshid — Editorial lead, Rifinit. More about the author · How we write and review.

Open OCR PDF Read the full guide Browse all tools

Standards and sources: PDF parsing and writing follow the open PDF specification, documented in the Library of Congress format registry; the interface follows WCAG 2.2 (W3C). Rifinit is independent of both organisations.

By the Rifinit team. Published under the Alex Roshid byline. We build, test and document these PDF tools in-house: every guide is written by the same engineers who work on the converters, the editor and the OCR pipeline. Meet the team. Read how we write and review, our privacy policy and terms. Last reviewed .

Follow Rifinit Facebook LinkedIn Pinterest Reddit