How to OCR a PDF offline on Windows
A scanned PDF is a photograph of a page: there is no text in it to find. OCR is what turns those pixels back into characters. Here is how to do that on your own machine, and what to expect.
Why a scanned PDF is not searchable
When a scanner or a phone camera produces a PDF, each page is an image. Zoom in far enough and the letters become pixels. Press Ctrl+F and there is nothing to match, because from the file's point of view the page contains no characters at all. OCR (optical character recognition) analyses the image, locates text regions, and predicts the characters inside them.
Why do it locally?
- Confidentiality. Uploading a contract, a medical record or a personnel file to someone else's server is often a policy violation, sometimes a legal one.
- Availability. Air-gapped networks, field laptops and locked-down corporate images have no internet route to a cloud OCR endpoint.
- Cost and volume. Per-page billing gets expensive when you have thousands of pages; a local model is free after the download.
- Speed for small jobs. No upload, no queue, no round trip.
What "offline OCR" actually runs
A modern local pipeline has two stages. A detection model finds text regions on the page, and a recognition model reads the characters in each region. FlyPDF ships offline OCR models in ONNX format and executes them through ONNX Runtime on your CPU — no GPU required, no network call, no API key.
In FlyPDF the recognised text becomes an in-memory text layer for the current session. That design matters: instead of writing a new "searchable PDF" to disk, the text is attached to the open document, so search finds it (hits from OCR are highlighted differently from native text hits), and the source file stays untouched. Close the document and the layer is discarded — re-open it and you OCR again if you need to.
Practical steps
- Open the scanned PDF in a viewer with local OCR (in FlyPDF: OCR the current page, or the whole document with progress and cancel).
- Wait for the page to be rasterised and processed — FlyPDF renders at 300 DPI for recognition, and runs inference on a separate thread pool so scrolling stays responsive.
- Search again. Terms that previously returned nothing should now match inside the recognised text.
- Export as text if you need the content elsewhere; export applies reading-order analysis and strips repeating headers and footers.
Accuracy: honest expectations
- Clean scans at 300 DPI — usually very good; expect occasional confusion between similar characters (0/O, 1/l/I, rn/m).
- Faxes and low-contrast copies — noticeably worse; expect to verify anything that matters.
- Photographed pages — perspective, shadows and curved pages hurt; results vary a lot.
- Skewed text — detection uses axis-aligned boxes, so rotated text is approximated by its bounding box and line order can suffer.
- Vertical text — quality is limited without an orientation classifier.
- Handwriting — generally outside the scope of print-oriented models.
OCR output is probabilistic. For legal, medical, financial or safety-critical use, treat it as a finding aid that tells you where to look, not as a verified transcript.
Quality tips that actually help
- Scan or export at 300 DPI when you control the source — below ~200 DPI accuracy drops quickly.
- Prefer grayscale or black-and-white over heavy JPEG compression; compression artefacts look like characters to a model.
- Deskew and crop before OCR if your scanner software can do it.
- For a long document, OCR a representative page first and search for a term you know appears. If it fails there, it will fail everywhere.
When cloud OCR is still the better choice
If you need handwriting recognition, form-field extraction, or high accuracy on badly degraded historical scans, large cloud services with specialised models will usually beat a small local one. The trade is your data leaving the machine — which for many documents is not a trade you are allowed to make.
<!-- fd:hublink --> Related guide: see Recovering a corrupted PDF for a detailed walkthrough.
FlyPDF does this locally. Read-only by design: OCR, search, annotations and text export all run on your machine, and the source file is never rewritten.
Try FlyPDF free for 30 days