Qianfan OCR vs OCRmyPDF
Pick Qianfan OCR when you need structured output from documents: Markdown, JSON, HTML, LaTeX or bounding boxes, including tables, formulas, handwriting and 192 languages. Pick OCRmyPDF when you have scanned PDFs that need a searchable text layer and PDF/A output, and you want it to run on CPU only. The main split is the output: Qianfan OCR parses layout into structured data, while OCRmyPDF only adds a Tesseract text layer to the PDF.
Qianfan OCRbaidu/qianfan-ocr | OCRmyPDFocrmypdf/ocrmypdf | |
|---|---|---|
| Type | OCR API | Open source |
| Price | 2 credits / page | 1 credit / page |
| Per 1,000 pages | $2.00 | $1.00 |
| Typical speed | 2.0 s / page | 1.0 s / page |
| Best for | Chinese documents | Searchable PDFs from scans |
| Inputs | PDF, images | PDF, images |
| Languages | Chinese, English and more | 100+ languages (via Tesseract) |
| Max pages per request | 200 | 1,000 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | No |
| Bounding boxes | No | No |
| Confidence | No | No |
| Forms | No | 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 Qianfan OCR if
- You need Markdown, JSON, HTML, LaTeX or bounding boxes, and OCRmyPDF gives only searchable PDF and plain text.
- Your documents have tables, formulas, handwriting or scene text, or you need key information extraction.
- You want a published benchmark: 93.12 on OmniDocBench v1.5, reported by the authors.
Choose OCRmyPDF if
- You need validated searchable PDF/A for archiving, with the OCR layer inserted losslessly where possible.
- You have no GPU and want a CPU-only tool that runs across all CPU cores.
- You run an office scanner pipeline and only need the text layer, with 100+ languages via Tesseract language packs.
Key differences
| Qianfan OCR | OCRmyPDF | |
|---|---|---|
| What it is | 4B end-to-end document parsing model (Qwen3-4B language model) from Baidu's Qianfan team | Command-line tool that adds a Tesseract OCR text layer to scanned PDFs |
| Output formats | Markdown, JSON, HTML, LaTeX, bounding boxes | Searchable PDF/A, plain text |
| Licence | Apache-2.0 | MPL-2.0 |
| How you run it | Self-hosted weights on Hugging Face, or hosted on the Baidu Qianfan platform | Runs locally as a command-line tool |
| Hardware | Benchmarked on one NVIDIA A100 with vLLM; not for CPU-only deployment | CPU only; spreads work across all CPU cores |
| Benchmark | OmniDocBench v1.5 overall 93.12; olmOCR-Bench 79.8; OCRBench 880 (author-reported) | Not published |
| Known failure | Thinking mode can emit up to 16,384 tokens, adding latency; 1.024 pages per second on an A100 with W8A8 | --skip-text with default PDF/A output removes form fields (issue #1790); hangs on PDFs whose forms share one Resources dictionary (issue #1763) |
Sources
- Qianfan-OCR model card
- Qianfan-OCR paper
- OCRmyPDF GitHub README
- OCRmyPDF docs
- Issue #1790 form fields
- Issue #1763 hang
What each one is
Qianfan OCR
Baidu's OCR-tuned vision model. Strong on Chinese documents and tables.
Qianfan OCR 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": "baidu/qianfan-ocr","fallbacks": ["ocrmypdf/ocrmypdf"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Qianfan OCR alternativesOCRmyPDF alternativesBest OCR models in 2026