Google Document AI vs OCRmyPDF
Pick OCRmyPDF when the job is turning scanned PDFs into searchable PDF/A archives on your own CPUs. Pick Google Document AI when you need a hosted API with layout parsing, form parsing or RAG chunking and can accept per-page billing and page limits. The main split is a local command-line tool that only adds a text layer versus a paid cloud service that returns structured data.
Google Document AIgoogle/document-ai | OCRmyPDFocrmypdf/ocrmypdf | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 10 credits / page | 1 credit / page |
| Per 1,000 pages | $10.00 | $1.00 |
| Typical speed | 1.4 s / page | 1.0 s / page |
| Best for | Multilingual scans | Searchable PDFs from scans |
| Inputs | PDF, images | PDF, images |
| Languages | 200+ languages | 100+ languages (via Tesseract) |
| Max pages per request | 500 | 1,000 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | No | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | No |
| Forms | ✓ Yes | No |
| 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 Google Document AI if
- You need JSON output with bounding boxes or chunks, which OCRmyPDF does not produce.
- You want Layout Parser chunking for RAG ($10 per 1,000 pages) or Form Parser ($30 per 1,000 pages) without running your own pipeline.
- You run bulk OCR on Google Cloud: Enterprise Document OCR costs $1.50 per 1,000 pages, $0.60 above 5M pages a month, and batch requests take up to 500 pages.
Choose OCRmyPDF if
- You need validated searchable PDF/A by default for archiving, with the OCR layer inserted losslessly where possible.
- You want no per-page fee: it is MPL-2.0, self-hosted, CPU only, and spreads work across all cores.
- You need Tesseract's 100+ languages through language packs, and your files must stay on your own machines.
Key differences
| Google Document AI | OCRmyPDF | |
|---|---|---|
| How you run it | Hosted API on Google Cloud | Local command-line tool and library, runs on CPU |
| Licence | Proprietary | MPL-2.0, open source |
| Price | Enterprise OCR $1.50 per 1,000 pages ($0.60 above 5M a month, first 1,000 free); Layout Parser $10; Form Parser $30 | Free; you pay for your own compute |
| Output formats | JSON, plain text, bounding boxes, chunks | Searchable PDF (PDF/A by default), plain text |
| Layout, tables and structure | Layout Parser and Form Parser; scored 64.6% on RD-TableBench, behind Azure and Textract | No layout, table or Markdown output |
| Size limits | Online requests 15 pages (30 in imageless mode); batch 500 pages; Form Parser batch 100 pages | Not published |
| Known failure | Weak on complex tables and long PDFs in a single synchronous call | --skip-text with default PDF/A output removes form fields (issue #1790); hangs on PDFs whose forms share one Resources dictionary (issue #1763); --deskew --clean-final can double or quadruple file size (issue #948) |
Sources
- Document AI pricing
- Document AI limits
- Reducto RD-TableBench
- OCRmyPDF GitHub README
- Issue #1790 form fields
What each one is
Google Document AI
Google Cloud OCR with layout parsing and specialised processors.
Google Document AI detailsOCRmyPDF
Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.
OCRmyPDF 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": "google/document-ai","fallbacks": ["ocrmypdf/ocrmypdf"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Google Document AI alternativesOCRmyPDF alternativesBest OCR models in 2026