OCRmyPDF vs Donut
Pick OCRmyPDF to make scanned PDFs searchable and keep them as PDF/A, with no training needed. Pick Donut only if you have a narrow, fixed-layout document type such as receipts or forms and can fine-tune it to return JSON. The main split is the job: OCRmyPDF adds a text layer to a PDF, Donut turns a page image into structured fields.
OCRmyPDFocrmypdf/ocrmypdf | Donutnaver/donut | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 1.0 s / page | 1.0 s / page |
| Best for | Searchable PDFs from scans | Receipt and form fields after fine-tuning |
| Inputs | PDF, images | images |
| Languages | 100+ languages (via Tesseract) | English, Chinese, Japanese, Korean |
| Max pages per request | 1,000 | 100 |
| Tables | No | No |
| Handwriting | No | No |
| Math | No | No |
| Bounding boxes | No | No |
| Confidence | No | No |
| Forms | No | ✓ Yes |
| Multilingual | ✓ Yes | No |
| On OCRRouter | Available | Available |
Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.
Which to choose
Choose OCRmyPDF if
- It outputs validated searchable PDF/A by default, which suits archiving and compliance workflows.
- It works out of the box on CPU only and spreads work across all CPU cores, with no training step.
- It uses Tesseract, so it covers 100+ languages through language packs.
Choose Donut if
- It maps a document image straight to JSON, with no separate OCR step, which suits receipt and form field extraction.
- It can be fine-tuned for parsing, classification or VQA on narrow, fixed-layout documents.
- It is MIT licensed and available in Hugging Face Transformers.
Key differences
| OCRmyPDF | Donut | |
|---|---|---|
| What it does | Adds a Tesseract OCR text layer to scanned PDFs | OCR-free transformer (Swin encoder plus BART decoder) that reads document images into structured output |
| Output formats | Searchable PDF, plain text | JSON, plain text |
| Ready to use | Yes, run it on a scanned PDF | No. The base checkpoint is pretrain-only and must be fine-tuned first |
| Licence | MPL-2.0 | MIT |
| Hardware and cost | CPU only, free, self-hosted (you pay for compute) | Free, self-hosted (you pay for compute). Hardware needs: Not published |
| Benchmarks | Not published | Not published |
| Known failure modes | Accuracy is capped by Tesseract; no layout, table or Markdown output. --skip-text with default PDF/A output removes form fields (issue #1790). File size can double or quadruple with --deskew --clean-final (issue #948). Hangs on PDFs whose forms share one Resources dictionary (issue #1763) | Misses tiny text in large images because of input resolution limits. One HN user found results on personal documents did not match the promised scores. Transformers v5 dropped image-to-text pipeline support, so it needs direct loading or v4 |
Sources
- OCRmyPDF GitHub README
- Issue #1790 form fields
- Issue #948 file size
- donut-base model card
- Donut ECCV paper
- Hacker News thread
What each one is
OCRmyPDF
Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.
OCRmyPDF detailsDonut
OCR-free document understanding model. Fine-tuned for receipts, forms and document Q&A.
Donut detailsTry both on your own file
Run the file once with each model and compare the output.
PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?
Use one, fall back to the other
{"model": "ocrmypdf/ocrmypdf","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
OCRmyPDF vs GOT-OCR 2.0OCRmyPDF vs NougatRapidOCR vs DonutEasyOCR vs DonutGemini Flash vs OCRmyPDFOCRmyPDF vs MiniCPM-V 4.5SmolDocling vs DonutGPT vs Donut
OCRmyPDF alternativesDonut alternativesBest OCR models in 2026