How OCR Makes a Scanned PDF Searchable, Start to Finish
A scanned page is a photograph. Your eyes read words in it; your computer sees a grid of grey and white dots with no more idea that it contains language than it has about a photograph of a beach.
Optical character recognition closes that gap. It examines the picture, works out which shapes are characters, and writes what it found into the document as real text. The page looks exactly the same afterwards. Everything else about it changes.
What OCR actually adds
This is the part worth understanding, because it explains every quirk that follows.
Recognition does not replace the scanned image with text. The photograph stays exactly where it is, pixel for pixel. What gets added is a second layer of real characters, positioned to sit precisely over the words in the picture, and rendered completely invisibly.
So the finished document has two things on every page: the picture you see, and an invisible transcript underneath it that you do not. Search matches the transcript. Selection highlights the transcript. Copying copies the transcript. Your eyes read the picture.
That design has a real virtue. Because the visible page is untouched, recognition cannot make your document look worse. A misread word is a wrong entry in an index, not a wrong word on the page. Compare that with anything that re-renders pages — compression does change how the page looks — and the trade is a good one.
It also explains the oddity people notice first: select text on an OCR’d scan and the highlight is often slightly offset from the printed words, because the invisible layer is positioned from the recognised bounding boxes and those are close rather than perfect.
Running it
- Open OCR PDF and choose your scanned document.
- Start recognition. Pages are processed one at a time, with progress shown per page.
- Export. You get a new document, visually identical, now searchable.
The recognition engine runs inside your browser as WebAssembly — the document is not uploaded, and neither are the recognised words. For a box of scanned personal records that is the difference between a private operation and handing your archive to a stranger; see how browser-based PDF processing protects your privacy.
The engine and its language data are fetched once from this site, then reused. First run is slower than the rest.
It processes every page
Recognition here runs over the whole document, not only the pages that look like pictures. On a document that is entirely a scan, that is what you want.
On a mixed document — mostly real text, with a few scanned exhibits — it means the text pages get a second recognised layer added over their existing one. Usually harmless, occasionally the cause of duplicate search matches. If that matters, extract the scanned pages, recognise those alone, and merge them back.
Expect very good, not perfect
Recognition accuracy on a clean, straight, 300 DPI scan of ordinary printed text is high — high enough that search works reliably and the occasional error never surfaces. It is not transcription, and treating it as though it were is the main way people get burned.
What degrades it, roughly in order of impact:
- Low resolution. Below about 300 DPI, character shapes lose the detail that distinguishes similar letters. This is the single biggest factor.
- Skew. A page scanned a few degrees off straight is markedly harder than one that is square.
- Poor contrast. Grey text on grey paper, faded thermal receipts, second-generation photocopies.
- Unusual typefaces. Decorative, script, and very condensed faces are much harder than ordinary body text.
- Handwriting, which this does not attempt. Print only.
- Complex layouts. Multi-column pages, tables, and text wrapped around figures come out in a reading order that may not match how you would read them.
- Noise. Scanner edge shadows, speckle, staple holes, and coffee.
Classic confusions to expect: 0 and O, 1 and l and I, rn read as m. If you search a document and find nothing, try again allowing for these — searching l0an finds things loan does not.
Never rely on unchecked recognition for numbers that matter. Account numbers, dosages, reference codes, monetary amounts. Read those off the picture with your own eyes.
Getting the best result
Almost all of the quality is determined before recognition starts.
Scan at 300 DPI in greyscale. This is the sweet spot: enough detail for reliable recognition, without the file size cost of higher settings. Colour rarely helps recognition at all and triples the data — the arithmetic is in why is my PDF so large.
Straighten first. Rotate the pages upright before recognising. A sideways page produces near-total nonsense, and a slightly skewed one produces scattered errors.
Crop the scanner edges. Black borders and page-edge shadows are noise the engine will try to interpret. Cropping removes them.
Compress before recognising, if you are doing both. Compression rasterises pages and would discard a text layer you had just created. Compress first, then OCR — never the reverse.
Rescan rather than rescue. If the source scan is genuinely poor and you still have the paper, thirty seconds of rescanning beats any amount of post-processing.
How long it takes, and why
Recognition is genuinely computational work, and it happens on your machine rather than on a server farm. A dense A4 page takes seconds rather than milliseconds, and a two-hundred-page scan is a job you start and walk away from.
Three things make the difference. The engine loads once — the first page of your first run includes fetching and starting the recognition engine, so it is markedly slower than the pages after it. Page density matters more than page count: a page of solid small print takes several times longer than a mostly-blank letter. And your hardware is the whole story, because there is no server to be fast on your behalf.
Leave the tab open while it runs. There is a per-page limit, so a page that stalls fails visibly and tells you which one rather than hanging forever — if that happens, the usual cause is a page that is mostly noise, and cropping or rescanning that page solves it.
If a long document keeps failing, split it, recognise the halves separately, and merge the results.
What OCR gives you, beyond Ctrl+F
Searchability is the headline, but it is not the whole benefit.
- Copying text out — quoting from a scanned report without retyping it. See why can’t I copy text from a PDF.
- Full-document search across pages, with page numbers and context — Search PDF.
- Finding split boundaries in a batch. Search for “Invoice number” and the list of pages it appears on is your set of boundaries — how to split a PDF.
- Your operating system’s file search can index the document, so it turns up in results without being opened.
- Screen readers get something to read, where before there was nothing at all.
Checking the result without reading it
You do not need to proofread a transcript you cannot see. Two checks take a minute and catch nearly everything.
Search for a word you know is on a specific page, ideally something distinctive from the middle of the document rather than a heading. If it is found on the right page, recognition worked on that page.
Select a paragraph and paste it into a plain text editor. You will see immediately whether you are getting clean sentences or scattered nonsense, and roughly what the error rate looks like. A handful of confused characters in a paragraph is normal and fine for search; a paragraph of garbage means something upstream — resolution, skew, contrast — needs fixing before recognition is worth rerunning.
Searchable is not accessible
That last point needs qualifying, because it is routinely overstated.
OCR produces a flat sequence of words. It does not identify headings, does not mark up tables as tables, does not add alternative text to figures, and does not establish a reliable reading order. A screen reader gets words rather than silence, which is a genuine improvement, but the document is not thereby accessible.
Real accessibility requires structural tagging, and the criteria are set out in the W3C’s Web Content Accessibility Guidelines. Where a document must be accessible, produce a tagged PDF from the original source. Scanning and recognising is a recovery technique for documents whose source is gone.
For archives
If these scans are going into long-term storage, the format designed for it is PDF/A, standardised as ISO 19005 — and what PDF/A is and whether you need it explains what conforming to it costs. It requires documents to be self-contained so they render and extract identically decades from now. The PDF Association publishes an accessible introduction to what the profile involves.
The variant intended for scans keeps the page image alongside the recognised text — the same two-layer arrangement described above, which is a good sign that the arrangement is the right one.
Keep the original scan
Recognition adds a layer and changes nothing visible, so the risk here is lower than almost any other operation. Keep the pre-OCR file anyway: if recognition quality disappoints and you later rescan or use different software, you want the original scan rather than one carrying a mediocre transcript.