How to OCR a PDF in Multiple Languages

Last updated

To OCR a PDF in multiple languages, the OCR engine has to load the language data for every language on the page at once, say English plus French. Our free OCR PDF tool runs Tesseract with English data only, so it reads English fine but drops a lot of accents and turns other alphabets into Latin look-alikes.

Tesseract itself, the free open-source engine behind our tool, can read many languages together when you run it on your own computer. You'll find the steps below, right after a test page that shows what English-only OCR does to other languages.

Open the OCR PDF Tool

What OCR PDF Does With Text in Other Languages

We ran a one-page test PDF with English, French, German and Russian lines through OCR PDF on our test server. The English line "Invoice total: 1,250.00 EUR" came back exactly. So did "Total général : 1 250,00 €".

The rest of the French line lost most of its accents: "reçu à Genève" turned into "recu a Geneve". In German, "Straße" became "StraBe" and "Müller" became "Miller".

Russian fared worst. "Счёт оплачен полностью" came back as "CyueT onnayeH NOJIHOCTbIO", Latin letters that only look similar, so searching that PDF for any Russian word finds nothing. Here the language data matters more than the scan quality.

OCR PDF with scanned-text.pdf uploaded and the Run OCR button, the tool that runs OCR on a PDF in English only rather than multiple languages
OCR PDF with a scanned test PDF uploaded. There's no language setting, because the tool reads English only.

How to OCR a PDF in Multiple Languages With Tesseract

Tesseract is free and runs on Windows, macOS and Linux. Its command line guide explains that -l with several languages joined by a plus sign, like -l eng+deu, uses them together for recognition.

  1. Install Tesseract plus the trained data file for each language in your PDF. The list of data files gives the codes, such as fra for French, deu for German, ara for Arabic and chi_sim for Simplified Chinese.
  2. Export each PDF page as a PNG image at 300 dpi. Tesseract reads images, not PDF files.
  3. Run a command like tesseract page-01.png page-01 -l eng+fra pdf for each page. According to the guide, the pdf option makes a PDF with the image and a separate searchable text layer, the same kind our OCR PDF tool adds, except ours only reads English.
  4. Join the page PDFs in order with Merge PDF.
  5. Search the result for words with accents and for words in each script, and compare every match with the page image.

Only list the languages that actually show up in the document. Try one test page and check it before you run the whole file.

Prepare Mixed-Language Scans for OCR

Tesseract's guide to improving quality says it works best on images of at least 300 dpi. Skewed pages and dark scanner borders hurt accuracy too, it warns.

Accents and small marks are the first to go when a scan is too dark or too light. Keep the original color or grayscale scan and skip harsh black-and-white filters, which can wipe out the dot on an i or the cedilla on a ç.

Does the document switch script from one section to the next? Split it so each part runs with the right languages, and note which original pages each part covers so you can put the corrected text back in order.

Check the Text in Every Language

Before you run OCR, pick two or three test words per language: a name with accents, a date, a heading. Search for each one in the result, because a clean English section can hide a failed passage in another language.

Copy a few lines into a plain text editor and read them against the scan. Look hard at names, numbers, dates and characters that look alike across alphabets, like a Latin A and a Cyrillic А.

OCR recognizes characters. It doesn't translate them. Fix the recognized text first and translate after, so a misread word doesn't turn into a fluent but wrong sentence.

Where OCR PDF Still Helps

For English pages, OCR PDF needs no installation. It turns each page into a 300 dpi image, reads it with Tesseract and lays the recognized text over the page image as an invisible layer, so the page keeps its size and you can search and copy the text.

It only takes PDF files, up to 25 MB each, so turn photos into a PDF first with JPG to PDF. You can add several PDFs at once and get a ZIP back, and uploads get deleted automatically within two hours.

Working with handwriting? See our guide to OCR for handwritten notes. For receipts from trips abroad, where a total in one currency sits next to text in another language, see OCR for scanned receipts.

Frequently Asked Questions about OCR PDF multiple languages

Can OCR PDF read French, German or Spanish?

It reads Latin letters, but with English data only, so expect missing or wrong accents and check every word. For reliable results, use Tesseract with that language's data file.

Can one OCR pass recognize two languages?

Yes. In Tesseract you list both, like -l eng+fra. Our OCR PDF tool has no language setting and always uses English, so it can't.

Does OCR translate the PDF?

No. OCR turns the page image into text in its original language, and translating is a separate step.

Does OCR PDF add an invisible text layer behind the scan?

Yes. The recognized text sits over each page image as an invisible layer, where you can search, select and copy it.

Can I upload photos to OCR PDF?

No, it only takes PDF files. Turn the photos into a PDF first with JPG to PDF.

Why do accented names come out wrong?

Without that language's data, the engine falls back on English letters, and a light scan can lose small marks as well. Compare every important name with the page image.