RoRoTo
On-device

Make a scanned PDF searchable, without uploading it

A scan is a photograph of paper. OCR turns the pixels back into characters and hides them under the picture — the part that decides whether it works is resolution.

You scan a signed contract, open it later, search for a clause, and get nothing. The document is not protected and not corrupted — it is a picture. Every page is a bitmap; the letters exist only as shapes.

Search, copy, screen readers and every downstream pipeline depend on a text layer: an invisible sequence of characters positioned underneath the image, so that the page looks identical while behaving like text. Adding that layer is what OCR does.

What OCR is actually doing

Four stages, each with its own failure mode:

  1. Layout analysis. The engine decides what is text, what is a picture, and what order blocks read in. On a clean single-column page this is trivial; on a form with labels beside fields, it is where columns get interleaved.
  2. Line and word segmentation. Pixels are grouped into lines, then words, then glyph candidates. Speckles, scanner noise and faint rules become spurious words.
  3. Character recognition. Each glyph image is matched against the trained model. This is the stage people think of as "OCR", and it is the one that performs best.
  4. Reconstruction. Characters are written back into the PDF at the coordinates of the original shapes, with zero-size or invisible render mode, plus an invisible word-spacing guess so that copy-paste produces spaces rather than one long string.

Nearly every "OCR is terrible" complaint traces to stage 1 or stage 2, not stage 3. The characters were recognised correctly and then assembled in the wrong order.

Resolution decides everything

A character needs enough pixels to have distinct shapes. Under about 200 DPI, a lowercase e and c are a handful of grey blocks and the model is guessing; at 300 DPI they are clearly different.

Scan resolutionPractical result
150 DPIBody text mostly recognisable, numbers and punctuation unreliable
200 DPIUsable for clean laser print; starts failing on faxes and dot-matrix
300 DPIThe standard. Near-perfect on printed body text
600 DPIMarginal gain on text, large cost in time and file size

If you control the scanning, 300 DPI greyscale is the setting to use. Colour buys nothing for recognition and triples the file size. And if the page is skewed by more than a degree or two, deskew it first — a tilted baseline is what makes line segmentation merge two lines into one.

Language selection is not optional

Recognition models are trained per script and per language. Handing a Chinese page to an English-only model produces confident nonsense: every character is mapped to the nearest Latin shape. The reverse is equally bad.

For mixed documents — an English contract with Chinese party names, a Chinese invoice with English product codes — the engine needs both models loaded at once and told to consider both. That slows recognition, and it is the difference between a usable text layer and one with every name mangled.

Two scripts that genuinely cannot be handled by a Latin model, in case you were hoping: Chinese and Japanese share thousands of glyphs with different readings, so a page has to be declared as one or the other. The engine will not infer it reliably from the page alone.

Why the first run needs a download

Honest accounting, because this is the place where "runs entirely in your browser" needs a caveat: OCR needs a trained model, and the model is a data file. The first time you run OCR, the language data is fetched from this site and then cached by the service worker. After that it runs offline.

Sizes are modest — the Chinese and English data files together are a few megabytes, not hundreds. Recognition speed is the real cost: a 300 DPI page takes a few seconds, and a 50-page scan takes minutes, because every pixel is being processed on your CPU rather than a rented one.

Why this belongs on your own machine

The documents people need to OCR are overwhelmingly the ones that cannot be handed to a server: scanned IDs, medical records, signed contracts, bank statements, immigration paperwork. The commercial OCR services that do this well also see every page you send — and many of them keep it.

There is no technical reason for OCR to leave the device. It is arithmetic over pixels. The only reason it usually does is that the model is large and someone else's GPU is cheaper than yours.

Running it

  1. Open OCR and drop in the scanned PDF. Searchable PDFs that already have a text layer will be mostly skipped, which is the behaviour you want.
  2. Pick the languages present in the document. Select both if the page is mixed.
  3. Run it. Pages are processed in order; the first run also downloads the language data.
  4. Download the searchable PDF and test it: open it and search for a word you can see on the page. If the search fails, recognition failed.

Then check the output with Extract text. Reading the extracted text is the fastest way to spot systematic errors — if every instance of rn came out as m, you need higher resolution, not a different tool.

What OCR will not fix

  • Handwriting. Modern engines handle printed text near-perfectly and handwriting poorly. A handwritten form will produce a text layer that is worse than none, because it looks searchable and is not.
  • Stamps and signatures over text. A red stamp across two lines of type destroys the pixels underneath; nothing recovers them.
  • Low-contrast faxes. Below roughly 200 DPI with heavy noise, expect character-level errors throughout.
  • Tables. Recognition gets the characters; reconstruction still has to guess the cell grid, and it guesses badly.

One more thing worth knowing: OCR makes files larger, often much larger, because every page now carries an image plus a text layer. If the result needs to be emailed, run Compress PDF afterwards — it will downsample the images while leaving the text layer intact and searchable.

Frequently asked

Why can I not search a scanned PDF?

Because there is no text in it. Each page is a bitmap image, so the letters exist only as shapes — nothing for a search box to match. OCR adds an invisible text layer underneath the image to fix that.

Is the document uploaded during OCR?

No. Reading the page, recognising characters and writing the new text layer all happen in the browser tab. The one download involved is the recognition model itself, which is fetched once and then cached for offline use.

What resolution do I need for good recognition?

300 DPI is the standard for printed text. At 200 DPI clean laser print still works but numbers and punctuation degrade; below that, character errors become systematic rather than occasional. Scanning above 600 DPI adds cost without adding accuracy.

Can it read handwriting?

Poorly. Recognition models are trained on printed type; handwriting produces output that looks like a text layer while being largely wrong, which is worse than having none. Treat handwritten pages as images and transcribe them manually.

Tools mentioned

Published 2026-11-14 · All guides