🌐 English
Open app

Blog

Getting text out of a scanned PDF — what OCR really does

Published 2026-08-15 · OCR · PDF · Scanning

Someone sends you a scanned contract as a PDF. The text looks crisp. But dragging across it selects nothing, and search finds nothing.

That is because the page does not contain text. It contains a photograph of text.

Two kinds of PDF

Digital PDFScanned PDF
Created by"Save as PDF" from Word or PagesA scanner or a phone camera
ContainsCharacter codes and font dataPixels
Copy and searchWorksDoes not
File sizeSmallLarge
When zoomedStays sharpGoes soft

The quick test: try to drag-select a word. If the highlight follows the letters, there is a text layer. If it selects a rectangle, or nothing at all, it's a scan.

What OCR does

Optical Character Recognition turns the shapes in an image back into characters. Roughly:

  1. Straighten a page that was scanned at an angle.
  2. Remove background noise and reduce to clean black-and-white.
  3. Separate text regions from images and rules.
  4. Split into lines, words, and glyphs.
  5. Score each glyph against a trained model to produce candidates.
  6. Pick among candidates using surrounding context and a dictionary.

Step six is why the language setting matters. Run an English model over a Korean page and "회의록" becomes something like "SPP|9".

Improving accuracy

  • Resolution: 300dpi is the target. Below 200 accuracy falls off a cliff; above 600 you gain almost nothing.
  • Straightness: a single degree of skew disturbs line detection. Leave auto-deskew on.
  • Contrast: highlighter marks and letters under a stamp are hard cases.
  • Typeface: printed serif and sans faces are reliable; handwriting is not.
  • Backgrounds: patterned paper wants a background-removal pass first.

Keeping the page, adding the text

Extracting a scan straight to a text file discards the tables, the stamps and the signatures. For a contract, that's unacceptable.

The usual answer is a searchable PDF: the scanned image stays exactly as it is, and an invisible text layer is placed on top of it. It looks like the original and behaves like a document.

OmniDesk's Searchable PDF tool does exactly this.

Choosing the route for you

The most common failure is running plain text extraction on a scan and getting an empty file — with no error, because nothing technically failed.

OmniDesk inspects a PDF before routing it. If there is a text layer, it extracts. If there isn't, it sends the file to OCR instead. You don't have to know which kind you have.

Start free