How to Make a Scanned PDF Searchable

A scanned PDF is a photograph of paper. It looks like a document but behaves like an image — you cannot search it, copy text from it, or extract data from it. Making it searchable requires a technology called OCR (Optical Character Recognition), which reads the pixels and produces actual text characters.

This guide explains what OCR does, why the quality of the source scan matters so much, and how to get reliable results with the tools available on OmniPDF.

What OCR actually does

OCR analyses an image and identifies text regions: bounding boxes around what it thinks are letters, words and lines. It then classifies each letter using a trained model that has seen millions of examples. The output is a sequence of characters that matches what is visible in the image.

OmniPDF uses Tesseract.js, an open-source OCR engine compiled to WebAssembly. It runs entirely in your browser — no upload, no server processing. This is unusual: most OCR services upload your document to a cloud server.

Why scan quality matters

OCR accuracy depends almost entirely on the quality of the image it is given:

  • Resolution. 300 DPI is the gold standard. Below 200 DPI, characters start to blur together. Below 150 DPI, OCR struggles.
  • Contrast. Black text on white paper is best. Grey text, coloured text or low-contrast scans reduce accuracy significantly.
  • Skew. Even a 2-degree tilt can cause OCR to misread lines. Flatbed scanners produce no skew; phone photos almost always do.
  • Fonts. Standard serif and sans-serif fonts work well. Stylised fonts, script fonts and handwriting work poorly.
  • Noise. Scan artifacts, background patterns and watermarks confuse OCR.

Realistic accuracy expectations

For a clean 300 DPI scan of printed text in English:

  • Standard body text: 95–99% character accuracy.
  • Headings and bold text: 90–95%.
  • Small print, footnotes: 80–90%.
  • Numbers and symbols: 85–95%.

For a phone photo of the same document:

  • Accuracy drops by 10–20 percentage points, largely because of skew and uneven lighting.

For handwriting:

  • Accuracy is typically below 70% for cursive and below 85% for printed handwriting. Do not rely on OCR for handwritten documents.

Two ways to make a PDF searchable

Option 1: Extract text to a .txt file

Use OCR PDF to run OCR on every page and produce a text file. The text is readable and copyable. The PDF itself is unchanged — you have a text file alongside the original.

Best for: archiving, indexing, feeding to a search engine, or producing a companion document.

Option 2: Add an invisible text layer to the PDF

Use Make PDF Searchable to add a text layer over the scanned image. The visible page looks the same, but Ctrl+F and text selection work.

Best for: making the original PDF searchable without creating a second file.

How to prepare a scan for better OCR

  1. Scan at 300 DPI if possible. Higher DPI does not help after 400 DPI; lower DPI causes accuracy loss.
  2. Use a flatbed scanner instead of a phone. If using a phone, hold it flat and use good lighting.
  3. Crop out shadows and edges using Crop PDF.
  4. Convert to grayscale using Grayscale PDF. Colour adds noise that hurts OCR.
  5. Then run OCR on the prepared file.

What to do with the extracted text

  • Search and archive: the .txt file is indexed by any search tool.
  • Edit in Word: convert the OCR result to .docx using PDF to Word.
  • Make the PDF permanently searchable: use Make PDF Searchable to add the text layer without creating a separate file.

Limitations of browser-based OCR

  • Speed. OCR is slow — expect 10–30 seconds per page on desktop, longer on phones. Use the "max pages" limit to OCR a sample before processing a long document.
  • Languages. English is bundled by default. Other languages require additional traineddata packs to be vendored (see the setup documentation).
  • Handwriting. Poorly recognised. Do not use OCR for handwritten notes.
  • Layout. The text layer alignment may not exactly match the visible image. Selecting a word sometimes selects a slightly offset rectangle.

Privacy

Tesseract.js runs in your browser. Your document is never uploaded. This is safe for confidential scans such as medical records, contracts and identification documents.