How to Make a Scanned PDF Searchable With OCR
By Docmint Team · · 4 min read
Run the scan through OCR to add an invisible text layer so you can search, select and copy its words. Here is how to get accurate results.
To make a scanned PDF searchable, run it through OCR (optical character recognition), which reads the words in the page images and adds an invisible text layer on top of them. In Docmint, open OCR PDF, pick the document's language, click Recognise Text and download the searchable PDF. Recognition runs in your browser, so the scan never leaves your device.
What does OCR actually do to a PDF?
A scanned PDF is a stack of photographs of pages. You can read it, but your computer cannot: search finds nothing, you cannot select a sentence, and screen readers have nothing to read aloud. OCR analyzes each page image, finds the lines of text and works out which characters they contain.
Docmint's OCR uses Tesseract, an open-source recognition engine, compiled to WebAssembly so it runs inside the browser. The result can be saved in two forms, and the right one depends on what you want to do next.
Searchable PDF or plain text: which output do you need?
A searchable PDF keeps your original pages exactly as scanned and places an invisible text layer precisely over the words. The document looks the same, but now Ctrl+F (Cmd+F on a Mac) finds words, you can highlight and copy passages, and document management systems can index it. Choose this when the PDF itself is what you will keep, file or send: signed agreements, archived invoices, scanned books, records you will need to search later.
Plain text output gives you just the recognized words in a .txt file. Choose this when you need the content rather than the document: pasting a scanned letter into an email, quoting an old report, or moving figures into a spreadsheet. If you later need text from the searchable PDF as well, PDF to Text can extract it.
How to OCR a scanned PDF with Docmint
- Open OCR PDF and drop in a scanned PDF or an image, such as a phone photo of a document.
- Pick the document language. The first time you use a language, its model (a few MB) is downloaded and cached in your browser, so later runs start faster.
- Click Recognise Text. Progress is shown page by page; larger scans take longer, and nothing is uploaded.
- Download either a searchable PDF (your original pages with an invisible text layer) or a plain text file.
Which languages can it read, including Arabic?
Supported languages include English, Spanish, French, German, Italian, Portuguese, Dutch, Arabic, Chinese and Japanese, among others. Each language pack is downloaded once and then reused.
Choosing the right language matters more than people expect. The recognizer uses each language's character set and typical word patterns to decide between similar shapes, so a French document read as English loses its accents, and an Arabic document read with a Latin-script model produces nonsense. Arabic is written right to left, with letters that change shape depending on their position in a word, which is exactly what the Arabic language pack is built to handle.
For documents that mix languages, such as a contract in Arabic and English, select the dominant language. Text in that language will be recognized most accurately; check the passages in the other language carefully afterwards.
What resolution should you scan at for OCR?
300 DPI is the sweet spot. At that resolution, ordinary body text has enough pixels per letter for clean recognition, and file sizes stay reasonable. On clean 300 DPI scans of printed text, browser OCR is typically above 95% accurate. Going much higher mostly makes files bigger and processing slower; going down to 150 DPI or less starts to blur small print and punctuation.
If you scan with a phone, the equivalent advice is to shoot in good, even light, hold the phone parallel to the page and fill the frame with the document. Blurry or shadowed phone photos are one of the most common reasons for poor results.
Tips for more accurate OCR
- Straighten pages first. Accuracy drops sharply on tilted text, so fix sideways or upside-down pages with Rotate PDF before running OCR.
- Start from the cleanest copy you have. A photocopy of a photocopy has lost detail that OCR cannot recover.
- Expect printed text to work best. Handwriting and low-quality photos are much harder, so treat those results as a rough draft.
- Proofread what matters. Names, numbers, dates and amounts are where a single misread character causes real problems, so check them against the page image.
- Be patient on the first run. The language model has to download once; after that it is cached.
Other ways to OCR a document
Many scanners come with software that can create searchable PDFs at scan time, and if yours does, that is often the most convenient route. Desktop PDF editors and several phone scanning apps include OCR as well. These are perfectly good options. A browser tool is useful when the scan already exists, when you are on a computer without that software, or when the document is sensitive and you would rather not send it to a service that processes files on its own servers.
Once your PDF is searchable, you can keep going: compress it for email with Compress PDF, or compare it against another version with Compare PDFs, which needs a text layer to work.