OCRRouter

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-aiOCRmyPDFocrmypdf/ocrmypdf
TypeOCR APIOpen source
Price10 credits / page1 credit / page
Per 1,000 pages$10.00$1.00
Typical speed1.4 s / page1.0 s / page
Best forMultilingual scansSearchable PDFs from scans
InputsPDF, imagesPDF, images
Languages200+ languages100+ languages (via Tesseract)
Max pages per request5001,000
Tables✓ YesNo
Handwriting✓ YesNo
MathNoNo
Bounding boxes✓ YesNo
Confidence✓ YesNo
Forms✓ YesNo
Multilingual✓ Yes✓ Yes
On OCRRouterAvailableAvailable

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 AIOCRmyPDF
How you run itHosted API on Google CloudLocal command-line tool and library, runs on CPU
LicenceProprietaryMPL-2.0, open source
PriceEnterprise OCR $1.50 per 1,000 pages ($0.60 above 5M a month, first 1,000 free); Layout Parser $10; Form Parser $30Free; you pay for your own compute
Output formatsJSON, plain text, bounding boxes, chunksSearchable PDF (PDF/A by default), plain text
Layout, tables and structureLayout Parser and Form Parser; scored 64.6% on RD-TableBench, behind Azure and TextractNo layout, table or Markdown output
Size limitsOnline requests 15 pages (30 in imageless mode); batch 500 pages; Form Parser batch 100 pagesNot published
Known failureWeak 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

What each one is

Google Document AI

Google Cloud OCR with layout parsing and specialised processors.

Google Document AI details

OCRmyPDF

Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.

OCRmyPDF details

Try 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": "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