Tools,

OCRmyPDF vs Tesseract and 4 others, tested

25.6 s

10 scanned pages to a searchable PDF

OCRmyPDF with Tesseract. It kept the scan's JPEGs.

Scan to text, no OCR install

One scan, 6 ways to a searchable PDF

Run In the PDF Text file Seconds MB PDF/A Peak MiB
OCRmyPDF, Tesseract 1,845 1,876 25.6 6.49 yes 512
Tesseract alone 1,875 1,878 31.6 6.52 no 135
OCRmyPDF, RapidOCR 1,862 1,895 46.8 6.49 yes 2,916
OCRmyPDF, EasyOCR 1,576 1,210 41.6 6.49 yes 1,777
Plain ocrmypdf, EasyOCR plugin installed 1,576 1,210 44.4 6.49 yes 1,798
PyMuPDF 1,872 none 16.2 50.07 no 376

Words: true words found in order, of 1,955. In the PDF: what pdftotext copies out. Text file: the tool's own .txt.

Tesseract alone read one page at a time. OCRmyPDF ran 2 pages at once. CPU time: 22.9 s against 35.6 s.

The 6 commands, as run (paths shortened, in a venv)
ocrmypdf --ocr-engine tesseract --jobs 2 --sidecar out.txt scan.pdf out.pdf
OMP_THREAD_LIMIT=2 tesseract list.txt out -l eng --psm 3 --dpi 300 pdf txt
ocrmypdf --ocr-engine rapidocr --jobs 2 --sidecar out.txt scan.pdf out.pdf
OMP_NUM_THREADS=2 ocrmypdf --ocr-engine easyocr --jobs 2 --sidecar out.txt scan.pdf out.pdf
ocrmypdf --jobs 2 --sidecar out.txt scan.pdf out.pdf
OMP_THREAD_LIMIT=2 python3 -I -c "$MUPDF" scan.pdf out.pdf /opt/homebrew/share/tessdata

$MUPDF is the PyMuPDF script further down.

Which one to use

ocrmypdf --ocr-engine tesseract --jobs 2 --sidecar out.txt scan.pdf out.pdf

Name the engine: plain ocrmypdf can run another one, as the trap below shows.

Tesseract alone reads images, not PDFs

pdfimages -j scan.pdf page
ls page-*.jpg > list.txt
OMP_THREAD_LIMIT=2 tesseract list.txt out -l eng --psm 3 --dpi 300 pdf txt

The EasyOCR plugin takes over plain ocrmypdf

Installing ocrmypdf-easyocr changes plain ocrmypdf. Its own code says it runs for the default --ocr-engine auto too.

EasyOCR reads boxes, not lines

Printed: "Keep your head, Hatton," commanded Hardy; "don't talk tommyrot.

The EasyOCR plugin's text file: Boy Air Scouts of the 86 The Keep Hatton; commanded head, 9} (( your Hardy;

It wrote its boxes out of line order. In order, its text file held 1,210 of 1,955 words.

More on boxes and lines: EasyOCR vs Tesseract.

OCRmyPDF can run PaddleOCR's models

pip install "ocrmypdf[rapidocr]" makes --ocr-engine rapidocr work (I installed 17.14.2 with uv). RapidOCR 3.10.0 runs PaddleOCR's PP-OCRv6 small models on ONNX Runtime.

PyMuPDF: fastest, but 7.7 times the file

This PyMuPDF recipe renders each page at 300 dpi, then OCRs that picture with MuPDF's built-in Tesseract.

The PyMuPDF script, as run
import sys, pymupdf
src, dst, td = sys.argv[1:4]
doc, out = pymupdf.open(src), pymupdf.open()
for page in doc:
    pix = page.get_pixmap(dpi=300)
    out.insert_pdf(pymupdf.open("pdf", pix.pdfocr_tobytes(language="eng", tessdata=td)))
out.save(dst, garbage=3, deflate=True)

Text only, no PDF: earlier runs

Tool Words, of 1,955 Run
PaddleOCR 3.7.0 1,919 Earlier run, Nov 22
Our Actor's code 1,877 Earlier run, Nov 27
Docling (docling-mcp 3.5.1, auto OCR) 1,855 Earlier run, Nov 27
EasyOCR 1.7.2 alone, paragraph=True 1,658 Earlier run, Nov 14

No OCR install: our Actor, text out

Our Apify Actor, PDF to Markdown OCR, runs Tesseract on scans (RapidOCR rereads a page Tesseract reads badly), with no OCR install. Its code found 1,877 of these 1,955 words.

The API call (not run for this test)
curl -s -X POST "https://api.apify.com/v2/acts/brasspage~pdf-ocr-to-markdown/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"documentUrls": ["https://example.com/your-file.pdf"]}' \
  | jq -r '.[].markdown' > out.md

What I tested, and what I did not

How I tested
  • Scan: 10 proofread book pages from English Wikisource, 1,955 true words.
  • Each page is a 1920 px JPEG at 300 dpi. The PDF is 6.49 MB.
  • Score: true words found in order, with exact case and punctuation (curly and straight quotes count as one), the scorer of my other OCR pages.
  • One run at a time, at background priority, with 2 jobs or 2 threads, on an Apple silicon Mac.
  • All 6 ran between 21:20 and 21:25 MST.
  • OCRmyPDF 17.14.2, Tesseract 5.5.4, PyMuPDF 2.2.
  • RapidOCR 3.10.0 on ONNX Runtime 1.32.0.
  • ocrmypdf-easyocr 0.3.0 with EasyOCR 1.7.2 and torch 2.15.0, on the Mac GPU.
  • PDF/A: I read the pdfaid tag in each file's XMP. No Ghostscript on this Mac. OCRmyPDF logged "Speculative PDF/A conversion succeeded - skipping Ghostscript".
  • The timed Tesseract run read the scan's JPEGs. pdfimages -j gave back the same 10 files, byte for byte.
  • The earlier rows used the same scan and scorer, with their own settings. EasyOCR alone, with paragraph=True: EasyOCR on a scanned book.
Sources and licenses
  • OCRmyPDF: MPL-2.0.
  • ocrmypdf-easyocr: MIT. Its _plugin.py, get_ocr_engine, says it runs for the default auto as well.
  • ocrmypdf-paddleocr 0.1.1 on PyPI: MPL-2.0.
  • Tesseract: Apache-2.0.
  • EasyOCR: Apache-2.0.
  • RapidOCR: Apache-2.0.
  • PaddleOCR: Apache-2.0.
  • PyMuPDF: AGPL-3.0, or a paid license from Artifex.
  • Docling: MIT.
  • Scripts and results stay in our private repo, in research/bench/ocrmypdf-vs-2026-11-27/.
  • We make the Apify Actor, not these tools.

Questions people ask

Is OCRmyPDF better than Tesseract?

For a scanned PDF, yes. It opens the PDF itself and marked the file PDF/A. Same engine, so the text files match (1,876 against 1,878), but its PDF copied out 30 fewer words (1,845 against 1,875). Both kept the JPEGs.

Why did ocrmypdf get worse after I installed ocrmypdf-easyocr?

The plugin also runs for the default --ocr-engine auto, so plain ocrmypdf used EasyOCR. Pass --ocr-engine tesseract, or install the plugin in its own venv.

Can OCRmyPDF use PaddleOCR?

Yes. --ocr-engine rapidocr runs PaddleOCR's PP-OCRv6 small models through RapidOCR. It found the most words in a text file of the 6 runs, at nearly twice the time.

Is PyMuPDF OCR faster than OCRmyPDF?

In this test, yes: 16.2 s against 25.6 s. But its PDF was 50.07 MB, against 6.49 MB, and PyMuPDF is AGPL-3.0 or a paid license.