The Short Answer

OCR (Optical Character Recognition) converts text in an image into machine-readable characters. Point it at a photograph of a page or a scan of a document, and it returns editable text you can search, copy, edit and paste elsewhere.

It matters because a scanned PDF is not a document — it is a picture of a document. Inside the file there is no text, only pixels. Every feature that depends on real text — search, copy-paste, screen readers, translation, text-to-speech — fails on it until OCR runs.

How It Works, Step by Step

  1. Preprocessing. The image is cleaned: rotated pages are straightened (deskewing), shadows and background noise are removed, and contrast is normalised. Most of the real-world accuracy difference between tools happens here, before any character is recognised.
  2. Layout analysis. The engine finds text blocks, then lines, then individual characters. On a page with columns it must work out reading order, which is why a two-column page can come out in the wrong sequence.
  3. Segmentation. Characters are separated from each other. This is the hardest step in scripts where letters connect or stack — Devanagari, Tamil, Arabic — because the boundaries between characters are not always visible.
  4. Recognition. Each segment is matched against a trained model. Older engines used template matching; modern ones use neural networks, usually recurrent or convolutional-recurrent models trained on thousands of examples of each character in many typefaces.
  5. Language modelling. The recognised characters are checked against the rules of the language, so a word that is recognisable as a likely word is preferred over a string of nonsense. This is why selecting the correct language input improves accuracy so much — it is not cosmetic.

What Determines Accuracy

OCR is not a single quality; it is a chain, and it fails at the weakest link:

  • Resolution. Below 200 DPI the small marks in many scripts disappear entirely.
  • Contrast and lighting. Faded ink and uneven shadows push characters toward the background.
  • Typeface and age. Modern print is clean. Pre-1990 print and legacy encodings are much harder.
  • Script. Latin scripts with separated letters are the easiest case. Indic and Arabic scripts, where characters connect, stack or carry diacritics, are harder.
  • Handwriting. A different and much harder problem than print recognition.

What OCR Is Not Good At

Understanding the limits saves wasted effort. OCR generally fails on:

  • Tables and forms, where the text extraction is correct but the structure is lost
  • Diagrams, charts and images, which contain no text to recognise
  • Documents where the meaning lives in the layout rather than the words

FAQ

Is OCR the same as scanning?

No. Scanning creates the image. OCR reads the text out of that image. A scanner without OCR gives you a picture of a document; OCR gives you the document's text.

Does OCR work on photographs taken with a phone?

Often yes, if the page is flat, well lit and in focus. Skew and perspective are the usual problems, and most engines correct mild skew automatically.

How accurate is it really?

Clean modern print is usually very good. Old or faded print typically needs a proofreading pass. Handwriting is variable. The honest answer is that OCR removes most of the typing work rather than all of it — see the mistakes to look for.

Related Reading