Search a 40-page scanned contract for “termination” and the reader finds nothing, even though the word is printed on page 12. The PDF is not broken. It never contained the word — only a picture of it.
A scan is a photo album
When a sheet goes through a scanner, the result is one large image per page — usually JPEG, sometimes CCITT Group 4 or JBIG2 for black-and-white documents. The PDF wraps those images in page objects and adds nothing else. There are no glyphs, no font tables, no text layer; the word “termination” exists as a few hundred dark pixels shaped like letters.
That is why selection fails, search fails, and the file is often surprisingly large.
The OCR pipeline
Optical character recognition reverses the process. A typical engine does four things:
- Rasterize at a workable resolution — around 300 DPI is the usual target. Lower, and thin strokes merge.
- Find text lines — group pixels into lines and blocks, working out reading order for columns and tables.
- Recognize characters — a trained classifier reads each shape in context, using a language model to choose between
1,l, andI. - Emit output — plain text, or an invisible text layer placed behind the page image, which is what makes a PDF “searchable.”
That last option is the good one for archives: the page still looks like the original scan, but search and copy work.
Where recognition fails
- Low resolution or compression artifacts — smeared strokes become guesses.
- Skew and curvature — a page fed crooked, or text printed on a bottle.
- Handwriting — Tesseract-class engines are trained on print, not cursive.
- The wrong language model — accents, CJK characters, and ligatures collapse.
- Tables — reading order gets scrambled even when every character is recognized.
Doing it locally
The image to text tool runs Tesseract.js — the OCR engine compiled to WebAssembly — inside your browser, so the image never leaves your machine. Two practical notes: it accepts image files, not PDFs, so export the scanned pages as PNG or JPG first; and pick the language before starting, because the engine loads a matching trained model. The output lands in a text box, ready to copy.
The rule: scan at 300 DPI, select the right language, and proofread every number. OCR gets prose mostly right and digits wrong just often enough to matter.