Documents

How to OCR a Scanned PDF Without Uploading It Anywhere

P

Pixellwork Editorial

Documents & Privacy

October 9, 2026
9 min read

Scanned documents are pictures of text — useless until OCR reads them. Here is how optical character recognition works, why accuracy varies so much, and how to run it entirely on your own machine.

You have a scanned contract. You need to find one clause. You press Ctrl+F, type the word, and nothing happens — because to your computer that page is not text at all. It is a photograph of text, as opaque as a picture of a cat.

Optical character recognition is what closes that gap. This article explains how it works, what determines whether it works well, and how to do it without handing your documents to a stranger's server.

Why a scanned PDF has no searchable text

There are two completely different kinds of PDF that look identical on screen.

A digitally created PDF — exported from Word, generated by an invoicing system, printed to PDF from a browser — contains real text objects. Each character is stored as a character, with a font and a position. You can select it, copy it and search it because the text is genuinely there.

A scanned PDF contains a photograph of a page, wrapped in a PDF container. There are no characters, only pixels that happen to form shapes a human reads as letters. Selecting text does nothing. Searching finds nothing. Converting it to Word produces an empty document — a result that confuses a great many people who assume the converter is broken.

A quick test: open the PDF and try to select a single word. If your cursor highlights a rectangle of the whole page rather than the word, it is a scan.

What OCR actually does

OCR software analyses the image and works out which characters those pixel shapes represent. Modern engines run roughly these stages:

  • Binarisation — reduce the page to black and white, separating ink from paper and normalising uneven lighting.
  • Deskewing — detect and correct a page that was scanned at an angle.
  • Segmentation — find the blocks, lines, words and finally individual characters.
  • Recognition — classify each character shape. Modern engines use neural networks trained on enormous quantities of text in many typefaces.
  • Language modelling — use dictionary and context to resolve ambiguity. This is why selecting the right language matters so much: it is what lets the engine decide between "rn" and "m".

What a "searchable PDF" is

The most useful OCR output is not a text file. It is a searchable PDF — sometimes called a sandwich PDF.

The trick is elegant. Your original scanned image stays exactly as it was, so the document still looks like the original with its signatures, letterhead and coffee stains intact. Behind the image, an invisible text layer is positioned so each recognised word sits precisely over its picture. You cannot see it, but you can select it, copy it, and find it with Ctrl+F.

This is what archives and document management systems mean by "OCR'd." It preserves the evidential appearance of the original while making it usable.

Why accuracy varies so much

OCR quality is dominated by input quality. The biggest factors, roughly in order:

  • Resolution. 300 DPI is the practical floor for reliable recognition. Below about 200 DPI, accuracy falls off a cliff.
  • Contrast. Crisp black on white is ideal. Faded fax output, grey photocopies and coloured backgrounds all hurt.
  • Straightness. Good engines correct a few degrees of skew. A photo taken at an angle, with perspective distortion, is much harder.
  • Typeface. Ordinary serif and sans-serif body text is read very well. Decorative fonts, handwriting and dot-matrix output are far less reliable.
  • Language selection. Running English recognition over a German document produces nonsense. This is the single most common user error.

Practical advice: scan at 300 DPI in greyscale rather than colour, keep the page flat and square, and if you are photographing rather than scanning, use even lighting and hold the camera parallel to the page.

Doing it without uploading

Here is the uncomfortable part. The documents people most want to OCR — contracts, medical records, tax paperwork, historical family documents, legal discovery — are precisely the documents they should be most careful about transmitting. Yet nearly every free online OCR service works by uploading your file to its servers.

That is no longer necessary. Tesseract, the open-source OCR engine originally developed at HP and maintained by Google for years, has been compiled to WebAssembly. It runs inside a browser tab at usable speed, which means full optical character recognition can happen on your own processor with the document never leaving your disk.

It is not magic and it is not instant — expect a few seconds per page, because real computation is happening on your machine rather than in a data centre. That is the trade, and for sensitive documents it is an easy one.

A practical workflow

For most scanned-document tasks, this sequence works well:

  • Run the scan through OCR PDF, choosing the correct language, to produce a searchable PDF.
  • If you need the words in a document you can edit, feed that searchable PDF into PDF to Word, which will now find real text.
  • If it is a table — a statement or an invoice — use PDF to Excel instead to recover the columns.
  • If the file is large, compress it before archiving or emailing.

Every step in that chain runs in your browser. Nothing is uploaded at any point, which is the whole reason the workflow is usable for documents that matter.

P

Pixellwork Editorial

Documents & Privacy

Published October 9, 2026

More Articles