What OCR does to a PDF
OCR, optical character recognition, looks at the picture of a page and works out which letters are where. This tool runs Tesseract, an open-source OCR engine, on each page without text, then writes what it read into the PDF as an invisible layer: every word sits over its picture, the size it appears on the page. Nothing you can see changes. What changes is what you can do with the file:
- Search it. Find a name, a date or an invoice number with your PDF reader's search, or let your computer's file search find the document by a word inside it.
- Select and copy. Drag over a paragraph and paste it into an email or a document, instead of typing it out again.
- Use it in other tools. Once the text is there, Compare PDF can compare its wording, PDF to Markdown can turn it into Markdown, and Redact PDF can find the words to black out.
Pages that already have text of their own, like the typed pages of a PDF that is partly scanned, are left exactly as they are, so their text isn't doubled. The tool tells you how many pages it will read before it starts.
Getting the best result
How well a page reads depends mostly on the scan. Tesseract does best with printed text, scanned straight, at a decent resolution. A few things help:
- Pick the right language. The language tells Tesseract which letters and words to expect. A German letter read as English loses its umlauts; pick both when a document mixes two, such as a contract with an English summary.
- Turn sideways pages first. The tool reads each page the way it is shown. A page scanned sideways or upside down reads as nonsense, so straighten it with Rotate PDF or Organize PDF before you start.
- Scan at 300 dpi if you can. Pages are read at up to 300 dots per inch, so a sharper scan gives Tesseract more to work with; a blurry phone photo of a page reads poorly.
- Expect trouble with handwriting. Neat printed handwriting sometimes reads; joined-up writing, stamps and very small print usually don't.
Languages and privacy
You can pick from dozens of languages, from Afrikaans to Yiddish, including scripts such as Arabic, Bengali, Chinese, Cyrillic, Devanagari, Greek, Hebrew, Japanese, Korean and Thai, and up to three at once. Each language needs its reading data, Tesseract's trained models (from under 1 MB to about 6 MB; the size is shown next to each language). It is downloaded from jsDelivr, a public file network, the first time you use that language, and your browser keeps it after that. Only the language is in that request: your PDF is never sent anywhere.
Everything else happens on your device: the pages are drawn, read and written into a new PDF by your browser. The OCR engine itself comes from this site (licences). Reading takes a few seconds a page on a laptop and longer on a phone, and up to 300 pages are read in one go; split a longer document with Split PDF and read it in parts. An encrypted PDF has to be unlocked first.
If you have photos of paper rather than a PDF, Scan to PDF straightens them into pages and can make them searchable in the same step.
Updated