A scan is a photograph of words. OCR is the bit that tries to turn it back into words.
When you scan a page, the computer does not get words. It gets a picture. Millions of dots, some dark, some light. To you it says “the respondent is not liable”. To the computer it is a pattern of dots, no different from a photo of your dog.
OCR (optical character recognition) is the software that looks at that picture and tries to find the letters in it. Roughly, it does five things.
- Cleans up the picture. Straightens a skew scan, removes specks, turns everything black and white so the letters stand out.
- Finds the text. Works out which parts of the page are writing, and which are stamps, lines or logos.
- Splits it up. Lines into words, words into letters.
- Guesses each letter. Compares each shape with shapes it has learnt. Modern OCR uses trained machine-learning models for this.
- Tidies up. Uses context and dictionaries to fix obvious errors. If it read “2room”, the “2” was probably a “Z”.

What comes out is text that a computer, and Claude, can search and read. On a clean, typed page, modern OCR is very good.
The catch is step 4. Every letter is a guess, and OCR does not show its working. A watermark over “not” can come out as “now”. A name scrawled in the margin can vanish, because step 2 decided it was a stamp. The text that comes out looks just as sure of itself either way. There is no little red flag saying “I wasn’t sure about this bit”.

So the rule I work by: OCR makes a PDF readable. It does not make it reliable. Anything that matters (names, dates, amounts, and the word “not”) gets checked against the page itself. The longer version of this story, with my own near misses, is in The PDF is not your friend.
Sources: the five steps follow the standard descriptions of OCR, for example Educative and Alexander Thamm (the “2room” example). Diagrams are mine; the documents in them are made up.