DocPro

How to extract text from a scanned document

A scan is just a picture of text. OCR reads the letters from that picture so you can copy, search and edit them.

You have a scanned contract, a photo of a printed page or a PDF that will not let you select any text. To get the words out, you need optical character recognition, usually shortened to OCR. It looks at the shapes in the image and works out which letters they are.

Check whether you need OCR

Open the PDF and try to select a word with your cursor or finger. If you can, the PDF already contains real text, and you can copy it directly. DocPro’s Extract text tool reads that text straight from the file. If the whole page highlights as one block, or nothing happens, it is a picture and needs OCR.

Get a good scan first

OCR accuracy depends mostly on the picture. A few minutes spent on the scan saves a lot of correcting later.

Run OCR in DocPro

  1. Open Extract text and choose an image or a PDF.
  2. Pick the language or languages that appear in the document. The tool supports English, Arabic, Persian, Urdu and Hindi. Choose every language that is actually on the page, because more languages make it slower.
  3. For a PDF, choose which pages to read.
  4. Run the extraction, then copy the text or download it as a .txt file.

Recognition runs in your browser and the language data is bundled with the page, so nothing is uploaded and nothing extra is downloaded. Extract text is a Pro tool on the web: you can set up your file and languages for free, and the run asks you to sign in to DocPro Pro.

What to expect

On a clean, printed page in a common language, OCR is usually good, but never perfect. Expect small errors, and expect more of them on poor scans, small print, unusual fonts and photos taken at an angle. Handwriting is generally not reliable. Tables and multi-column pages may come out as lines of text in an order you did not intend, and the layout is not preserved.

Proofread it

Always read the result against the original. Typical mistakes are lookalike characters: the letter O and the number 0, a lowercase l and the number 1, rn read as m, and broken accents or diacritics. Pay extra attention to numbers, names, dates, reference codes and amounts, since a wrong digit is easy to miss. Search for patterns, such as double spaces or stray symbols, that point to a bad area.

After extracting

Privacy

Scanned documents are often sensitive: IDs, medical letters, contracts. Because OCR here runs on your device, the picture is never sent to a server. Close the tab when you are done, and delete the text file if you do not need it.

OCR output is a draft. Check names, numbers and dates against the original before you rely on them.

A clean scan, the right language and a careful proofread are what turn a picture of a page into text you can use.

Open Extract text

Tools used in this guide

Quick tasks

More guides