How to Make a Scanned PDF Searchable With OCR
A scanned PDF looks like a document but behaves like a photograph. You cannot search it, you cannot select a sentence from it, and neither can the person you send it to. Optical character recognition fixes that by adding a text layer behind the image — and knowing how it fails is what separates a useful result from a frustrating one.
What OCR actually changes
OCR does not alter the appearance of your document at all. The page still shows the same image, pixel for pixel. What changes is that a layer of invisible text is placed behind that image, positioned to line up with the letters it recognised.
That is why a good OCR result is genuinely better than retyping. The document keeps its original look — stamps, signatures, letterheads, the exact layout — while gaining the ability to be searched and copied.
If you open an OCRed PDF in a reader and select text, you will see the selection snap to words as you drag. That is the text layer doing its job. Formally, this is a PDF with a searchable text layer, sometimes labelled PDF with OCR, which is acceptable for most archives and filing systems.
Is your PDF a scan?
- Open it and try to select a sentence. If nothing highlights, it is an image with no text layer.
- Try to search for a word you can clearly see. If the search finds nothing, there is no text layer.
- Check the file size against the page count. A scan is usually 300 KB or more per page; a digital document is often 30–80 KB per page.
- Zoom in to 400%. A scan gets blurry and shows paper texture; digital text stays crisp at any zoom.
What accuracy to expect
For clean, printed documents in a normal typeface, modern OCR is very accurate — high enough that searching works reliably and only occasional words need correcting. Documents that meet this description are the ones OCR was designed for.
Accuracy falls in predictable situations: faint or faded print, low-resolution scans below about 200 DPI, unusual or decorative fonts, text over a coloured or patterned background, pages photographed at an angle with uneven lighting, and columns or tables where reading order is ambiguous.
Handwriting is a different category entirely. OCR engines are trained on printed characters, and handwriting recognition is a separate and much harder problem. Expect poor results on handwritten forms, and do not rely on it for anything where the words matter.
Getting the best result from a scan
- Scan or photograph at 300 DPI if you can. Below 200 DPI, character shapes start to merge and accuracy drops sharply.
- Straighten the page. A skewed scan forces the engine to guess at slanted baselines.
- Use even lighting and avoid shadows across the text. A dark band down one side is where recognition fails first.
- Convert to greyscale rather than leaving a colour cast. The engine works on contrast, and a yellow or blue tint reduces it.
- Deskew and crop before running OCR, so the text fills the frame and sits level.
- Run OCR before compressing. Compression artefacts make recognition worse, and the text layer costs almost nothing in file size.
Choosing the language
Set the recognition language to match the document, not to your own default. An English-trained model reading a Malay document will produce plausible-looking nonsense, which is worse than obvious errors because it slips through checks.
For documents containing two languages, most engines can be told to consider both, at some cost in speed. For a document that is 95% one language with a few foreign terms, use the dominant language and correct the exceptions by hand.
Language data is what makes OCR heavy. Each language model is a separate download of several megabytes, so the first run in a new language takes longer than subsequent ones.
Common problems after OCR
- The text copies as one long line. Recognition often loses line structure. Group the text by paragraph manually, or convert to Word and rebuild the paragraphs there.
- Numbers are wrong. Digits are the commonest error, particularly 1 and l, 0 and O, 5 and S, and 8 and B. Always check account numbers, totals and dates by eye. Never trust an OCRed figure you have not verified.
- Accents and symbols are mangled. Restrict recognition to the language actually present; adding languages increases the chance of mis-reading characters.
- A page is blank in the text layer. That page was probably too dark, too light or too skewed. Re-scan just that page and run OCR again on the corrected version.
- File size grew a lot. Text layers do add size, though far less than the images. If the file becomes unmanageable, compress afterwards — the text layer survives compression, since it is not an image.
Privacy, since scan content is usually sensitive
OCR is normally applied to exactly the documents people least want to hand over: identity papers, bank statements, contracts, medical letters. Most online OCR services upload every page to a server, run recognition there, and return the result.
Browser-based OCR runs the recognition engine on your own device. The engine and language data are downloaded once, and the pages never leave your machine. It is slower than a server farm, and it is the right trade when the document contains something you would not post publicly.
For very large documents — hundreds of pages — a desktop tool will be faster and more predictable than a browser, and keeps the same privacy advantage.