How to Get Accurate OCR from Scans

OCR turns pictures of text into real, searchable text, but only as well as the scan allows. These steps make the biggest difference to accuracy.

What OCR does

OCR (optical character recognition) looks at an image of a page, finds shapes that look like letters, and works out which characters they are. The result is usually added to the PDF as an invisible text layer behind the page image, so the page looks the same but becomes searchable and copyable.

OCR accuracy on a clean, well-scanned printed page is often above 99% of characters. On a blurry phone photo of a creased receipt, it can be far lower. Almost all of that difference comes from the image you start with.

The six factors that matter most

Factor Best practice Why
Resolution 300 DPI (400–600 for tiny print) Letters need enough pixels to be recognised
Alignment Straight, not tilted OCR expects horizontal lines of text
Contrast Dark text on a light, even background Shadows and coloured paper confuse letter edges
Focus Sharp, no motion blur Blur merges letters together
Language Set the correct language(s) OCR uses dictionaries to resolve unclear letters
Text type Printed text Handwriting is much less reliable

Scanning tips

Flatbed or sheet-fed scanner - Set 300 DPI and grayscale. - Clean the scanner glass; dust becomes specks that look like punctuation. - Remove staples and flatten folded pages.

Phone camera - Use a scanning app, or the built-in scanners in the iPhone Files and Notes apps or Google Drive on Android. They straighten pages and boost contrast automatically. - Shoot in daylight or bright, even light, avoiding your own shadow across the page. - Hold the phone parallel to the page, filling the frame. - Put the page on a dark, plain surface so the edges are easy to detect.

Old or faint documents - Increase contrast slightly, but don't push it to pure black and white, which breaks thin letters. - Scan at higher resolution (400–600 DPI).

Layouts that cause trouble

  • Multiple columns: OCR may read across columns instead of down them. Check the reading order of converted text.
  • Tables: cells can merge or shift. Check numbers row by row.
  • Text over pictures or backgrounds: recognition drops sharply.
  • Stamps, signatures and handwritten notes over printed text: these may be read as random characters.
  • Very small print, such as footnotes and terms and conditions: scan at higher resolution.

Check and fix OCR results

Never trust OCR output blindly for anything important:

  1. Spot-check numbers. Look specifically for 0/O, 1/l/I, 5/S, 8/B, rn/m and cl/d mix-ups.
  2. Search for key terms you know are in the document. If a name isn't found, it was probably misread.
  3. Compare side by side with the page image for contracts, invoices and anything you'll rely on.
  4. Run a spell check after converting to Word. OCR errors often show up as misspellings.

After OCR

Once a scan has a reliable text layer, you can:

Not sure whether your PDF already has text? See Scanned vs native PDFs.

Frequently asked questions

What DPI is best for OCR?

300 DPI is the standard recommendation for normal printed text. Use 400–600 DPI for very small print. Below 200 DPI, accuracy drops quickly.

Should I scan in colour or black and white for OCR?

Grayscale is usually best. Pure black-and-white can break thin letters or fill in small gaps, and colour adds size without helping accuracy.

Can OCR read handwriting?

Standard OCR is designed for printed text and is unreliable on handwriting. Neat block capitals work better than joined-up writing.

Why are numbers wrong after OCR?

Similar-looking characters such as 0 and O, 1 and l, 5 and S, and 8 and B are the most common errors. Always check figures, dates and account numbers by hand.

About Dr. AK

Dr. AK writes PDFWisely's guides on document conversion, PDF standards and file security.

Read Dr. AK's full profile