Getting text out of a scanned PDF — what OCR really does
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 PDF | Scanned PDF | |
|---|---|---|
| Created by | "Save as PDF" from Word or Pages | A scanner or a phone camera |
| Contains | Character codes and font data | Pixels |
| Copy and search | Works | Does not |
| File size | Small | Large |
| When zoomed | Stays sharp | Goes 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:
- Straighten a page that was scanned at an angle.
- Remove background noise and reduce to clean black-and-white.
- Separate text regions from images and rules.
- Split into lines, words, and glyphs.
- Score each glyph against a trained model to produce candidates.
- 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.