Docling OCR engines, tested on real scans
3
languages, each won by a different engine
Pick by your scans
- On a Mac: ocrmac, 98.5% of English words.
- Latin or Cyrillic: Tesseract, 97.2% English, 94.9% Russian, but the slowest.
- Chinese: RapidOCR, 96.0%.
English books: ocrmac found 98.5%
55 proofread Wikisource pages from 11 books. Words found, of 14,446:
| Engine | Words found |
|---|---|
| Docling + ocrmac | 98.5% |
| Docling + Tesseract | 97.2% |
| Docling + RapidOCR | 96.8% |
| Docling + EasyOCR | 89.1% |
| Tesseract alone | 97.0% |
| Our Actor | 97.9% |
Each engine had English as its only language. Docling did not make Tesseract read better: 97.2% inside, 97.0% alone.
Russian and Chinese: no engine won both
Letters right in order, scored as on my Tesseract pages:
| Engine | Russian (90) | Chinese (36) |
|---|---|---|
| Docling + Tesseract | 94.9% | 87.1% |
| Docling + ocrmac | 91.3% | 94.6% |
| Docling + RapidOCR | 78.9% | 96.0% |
| Docling + EasyOCR | 69.8% | 16.3% |
| Tesseract alone | 91.1% | 88.4% |
| Our Actor | 86.9% | 86.5% |
Tesseract alone used the same model as inside Docling. Its best Russian setting, with Sauvola, got 95.1%.
How I tested it
- Pages: real scans of 45 books from Wikisource, whose text people proofread. They are the pages of my earlier Tesseract tests, picked by a seeded shuffle, not by me.
- Docling 2.149.0 defaults on Python 3.12. I set only the OCR engine and its language, and scored the Markdown.
- Each set is scored by the same code as its Tesseract page. Tesseract 5.5.4 with the tessdata_fast models.
- The scans are image files with no DPI tag. Docling reads them as 72 dpi and runs OCR at 3 times that size.
- Our Actor: the code of build 0.1.44, run on my Mac, not on Apify.
- English counts curly quotes as straight ones. Tesseract prints curly quotes, Docling straight ones.
- One Mac: Apple M5 Max, macOS 26.6. EasyOCR ran on its GPU.
EasyOCR loses words to a 0.5 cut
Docling drops every EasyOCR word that scores under 0.5. On Chinese, that was most of the text:
16.3% at the default
83.5% with the cut at 0
Set confidence_threshold=0.0 in
EasyOcrOptions. On English it went from 89.1% to 92.5%,
still last.
Set the language yourself
-
With nothing set, Docling picked ocrmac on my Mac and found 0.0% on
the Chinese scans. Set
lang. -
TesseractCliOcrOptions()asks for English, Spanish, French and German. With only English installed, it stops with an error. -
Docling checks Tesseract languages with
tesseract --list-langs, so itspathoption did not help.TESSDATA_PREFIXdid.
What Docling picks if you set nothing
| You install | Docling picks |
|---|---|
pip install docling |
RapidOCR, on torch |
pip install "docling[ocrmac]" |
ocrmac, on a Mac |
On Russian, RapidOCR on torch found 43.0%, and on onnxruntime 78.9%, with the same settings. On English and Chinese, both got the same score.
Speed: RapidOCR 1.7 s, Tesseract 7.0 s a page
Seconds a page, the median of the 55 English scans, one engine at a time:
| Engine | Seconds |
|---|---|
| Docling + RapidOCR | 1.7 s |
| Docling + ocrmac | 1.8 s |
| Docling + EasyOCR | 2.2 s |
| Docling + RapidOCR on torch | 3.5 s |
| Docling + Tesseract | 7.0 s |
| Tesseract alone | 0.8 s |
Start-up took 2.1 to 3.7 s more, once.
Pick the engine in Python
pip install "docling[rapidocr]==2.149.0"
from docling.datamodel.base_models import InputFormat
from docling.datamodel.pipeline_options import PdfPipelineOptions, RapidOcrOptions
from docling.document_converter import DocumentConverter, PdfFormatOption
opts = PdfPipelineOptions(ocr_options=RapidOcrOptions(lang=["en"]))
converter = DocumentConverter(
format_options={InputFormat.PDF: PdfFormatOption(pipeline_options=opts)}
)
markdown = converter.convert("scan.pdf").document.export_to_markdown()
On a Mac, install docling[ocrmac] and use
OcrMacOptions(lang=["en-US"]). For Tesseract, use
TesseractCliOcrOptions(lang=["eng"]).
What I did not test
- Linux, Windows, and an NVIDIA GPU.
- Nemotron OCR, tesserocr and remote OCR servers.
- Handwriting, phone photos, receipts and tables.
- PDFs that already have a text layer.
- Other Docling versions.
Sources
Our Actor came second on English
Our Apify Actor runs Tesseract, with no install. On these English pages it found 97.9%, behind only Docling with ocrmac. On Russian and Chinese it trailed Docling's best.
Two ways to skip the work
Run it yourself. Our Apify Actor turns scanned PDFs into Markdown, tables included.
Or send us the scan. Tack, our AI, does the job for $29, up to 50 pages. First page free.
Questions people ask
What OCR engine does Docling use by default?
The first one it finds installed. On my Mac, a plain pip install docling gave RapidOCR on torch. With ocrmac installed, Docling picked ocrmac.
Is EasyOCR or Tesseract better in Docling?
Tesseract, on all 3 sets I tested. It found 97.2% of the English words and EasyOCR 89.1%. On Russian it was 94.9% against 69.8%.
Why does Docling's EasyOCR miss text?
Docling drops EasyOCR words it scores under 0.5. On Chinese scans, confidence_threshold=0.0 raised it from 16.3% to 83.5%.