OCRmyPDF vs Chandra
Pick OCRmyPDF to make scanned PDFs searchable and keep them as PDF/A on a CPU-only box. Pick Chandra when you need Markdown, HTML or JSON with layout, tables and bounding boxes, for example to feed a RAG pipeline, and you have a GPU or can use the hosted API. They solve different jobs: OCRmyPDF adds a text layer to the PDF, Chandra reads the page and returns structured text.
OCRmyPDFocrmypdf/ocrmypdf | Chandradatalab/chandra | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 2 credits / page |
| Per 1,000 pages | $1.00 | $2.00 |
| Typical speed | 1.0 s / page | 2.0 s / page |
| Best for | Searchable PDFs from scans | Complex layouts and handwriting |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages (via Tesseract) | 40+ languages |
| Max pages per request | 1,000 | 500 |
| Tables | No | ✓ Yes |
| Handwriting | No | ✓ Yes |
| Math | No | ✓ Yes |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | No |
| Forms | No | ✓ Yes |
| Multilingual | ✓ Yes | ✓ Yes |
| 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
- You need validated searchable PDF/A output for archiving, with the OCR layer inserted losslessly where possible.
- You only have CPUs: it spreads work across all cores and needs no GPU.
- You want a permissive MPL-2.0 tool that is free to self-host, with 100+ languages through Tesseract language packs.
Choose Chandra if
- You need Markdown, HTML or JSON output, with layout chunks and bounding boxes for each block, instead of a searchable PDF.
- Your documents have tables, forms or math, or are in many languages: the authors report 77.8% average accuracy across 43 languages and 85.8 on olmOCR-bench.
- You prefer a hosted option: the Datalab API costs $1, $3 or $7.50 per 1,000 pages, with a free tier of $20 per month.
Key differences
| OCRmyPDF | Chandra | |
|---|---|---|
| What it does | Adds a Tesseract text layer to scanned PDFs. No layout, table or Markdown output. | Vision-language model that converts pages to Markdown, HTML or JSON with layout. |
| Licence | MPL-2.0. | Code Apache-2.0. Weights under modified OpenRAIL-M: free for research, personal use and companies under $2M funding or revenue. Above that you need a commercial licence. |
| How you run it | Local command-line tool, CPU only. | Self-host on a single NVIDIA GPU with vLLM (presets for A100, L40S, RTX 4090/5090), or use the hosted Datalab API. |
| Price | Free, self-hosted. You pay for compute. | Self-hosted: free within licence terms. Hosted API: $1, $3 or $7.50 per 1,000 pages. |
| Output formats | Searchable PDF (PDF/A by default) and plain text. | Markdown, HTML, JSON and bounding boxes. |
| Benchmarks | Not published. | Chandra 2 scores 85.8 on olmOCR-bench (authors' figure). Old Scans category scores only 51.1. |
| Known failure | --skip-text with default PDF/A output removes form fields (issue #1790). Some PDFs with forms sharing one Resources dictionary hang (issue #1763). Handwriting is not a target use. | Token-loop hallucinations on 5-6 of about 60 Russian and Kazakh scans, plus missing pages (issue #51). Weak on Urdu (43.2%) and Sanskrit (51.1%). |
Sources
- OCRmyPDF GitHub README
- Issue #1790 form fields
- Issue #1763 hang
- Chandra GitHub README
- Datalab pricing
- GitHub issue #51 token loops
What each one is
OCRmyPDF
Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.
OCRmyPDF detailsChandra
Datalab's OCR model that keeps layout and handles forms, tables and handwriting.
Chandra detailsTry both on your own file
Run the file once with each model and compare the output.
Use one, fall back to the other
{"model": "ocrmypdf/ocrmypdf","fallbacks": ["datalab/chandra"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
OCRmyPDF alternativesChandra alternativesBest OCR models in 2026