How free OCR turns a photo into a searchable PDF
The searchable part isn't the image. It's a second layer of invisible text sitting on top of it, and understanding that layer explains both the free/paid split and the errors you'll see.
Disclosure: I build ScanWisp, a browser scanner that runs OCR locally. This piece explains the mechanism rather than the product, but I have an obvious interest in the local-processing side of the argument.
Scan a page with a phone camera and you get a PDF that looks right and behaves wrong. It prints fine. You cannot search it, you cannot select a sentence, and if you try to copy an account number out of it you get nothing. The file is a picture of a document, not a document.
Fixing that is what OCR does, and the way it fixes it is more literal than people expect.
A PDF page can hold more than one thing
A page in a PDF is a small stack of drawing instructions. Usually a scanned page has exactly two meaningful entries in that stack:
- An image. Your photo, compressed, drawn to fill the page.
- A text layer. Real text with real character codes, positioned so that each word lands roughly where it appears in the image, then drawn in an invisible rendering mode.
Invisible text is a normal PDF feature. The text is there, with a font and coordinates, and the renderer is told not to paint it. Search, selection and copy all read the text layer, which is why a searchable PDF behaves like text even though your eyes only ever see the scan.
Two consequences follow, and both surprise people. The first is that a "searchable PDF" is still an image. There is no vector layout hiding underneath; you can't reflow it, and editing a sentence means editing pixels. The second is that the text layer can be wrong while the page looks perfect, because it was guessed by a machine that never saw the original document, only the photo of it.
How the text layer gets built
OCR runs in two passes and they fail in different ways.
Pass one: find the text
A detection model looks at the page and returns boxes: this rectangle contains a line of text, that one contains a heading, this stray box is a stamp. It doesn't read anything yet. Skewed photos, strong shadows and decorative borders are the usual reasons boxes come back wrong, which is why correcting the perspective before OCR improves the result more than any tuning afterwards.
Pass two: read each box
A recognition model takes each line and outputs characters. This is where errors appear, and
they cluster in a predictable way: lookalike pairs, not random nonsense. rn read
as m, 1 as l, 0 as O, a
decimal point lost between two digits. That's also why OCR typos are so hard to spot by eye:
the page looks fine, the extracted number is off by a factor of ten.
After recognition, the tool writes each character into the text layer at the position of its box, and adds a mapping table so the PDF knows which character code means which Unicode character. Skip that table and you get a file that searches correctly but copies out as garbage, which is a common failure in cheap converters.
Why server OCR is metered and local OCR isn't
Recognition is cheap per page and expensive per million pages. A service that runs it on its own GPUs is paying for every page forever, so a page cap isn't stinginess, it's arithmetic. The free tier is a marketing budget with a monthly ceiling.
Local OCR moves that cost onto your device. The models are downloaded once and cached by the browser; after that, recognition runs on your phone or laptop and nobody is paying per page. That's the real reason "unlimited OCR" is possible offline, and it's also the honest limitation: recognition speed depends on your hardware, and the first run for a language includes a download.
How to tell whether a PDF is really searchable
Not every tool that advertises OCR produces a usable text layer. Four checks, in increasing order of rigor.
- Open it and press
Ctrl+F. Search for a word you can see on the page. No hit means no text layer. - Drag across a line. If the selection highlight sits on top of the words, the coordinates are right. If it drifts, the OCR ran at a different resolution than the image drawn on the page, and search will still work while selection feels broken.
- Copy a number. Paste it into a text editor and check the digits. This is the test that catches the failures that matter, because a misread digit still searches fine.
- Run
pdftotexton it, if you have a terminal. It dumps the text layer without the image, which makes it obvious whether the layer is real or empty.
Where on-device OCR struggles
Printed text, at a reasonable resolution, in a language the model covers, is a solved problem. Everything outside that sentence is a coin flip.
- Handwriting. Cursive signatures and handwritten forms are still bad, on every engine. Fill-in-the-blank forms with typed labels and handwritten answers will read the labels and mangle the answers.
- Tables. You get the words, not the structure. Cells come out as a stream of lines with no relationship to each other.
- Low resolution. Below roughly 200 dpi, even clean print starts dropping characters. A full-page photo from a phone is fine; a photo of a page taken from across a room is not.
- Mixed scripts. A page that mixes languages needs the right model selected. Guessing wrong doesn't fail loudly, it produces plausible text in the wrong alphabet.
A note on capability claims, because the industry is careless here. "Supports 100+ languages" usually means "the underlying engine has models for 100+ languages," not "we've measured accuracy in 100+ languages." Those are different promises. ScanWisp ships 66 languages and marks six of them (Chinese, English, Japanese, German, French, Korean) as verified, with the rest labelled as best-effort, because that's what we can actually stand behind.
The one thing to check before you trust a scan of numbers. Invoices, lab results and bank statements are exactly the documents where a misread digit costs money. Run the copy-and-paste test on one page before you archive a batch.
The privacy half of the argument
There's a second reason local OCR matters, and it's simpler than the cost one. If recognition runs in the tab, the image and the text layer it produces never leave the device. If it runs on a server, both do, and the text layer is the more sensitive of the two because it's searchable prose rather than a picture of prose.
You don't have to take that on faith. Import a page in airplane mode, export, and see whether it works. A server-side tool will stop at the export step.
See it for yourself. ScanWisp builds the text layer in your browser tab: detect, recognise, embed. Export a PDF, then search it in any reader.
Scan a document