GLM-OCR vs OCRmyPDF
Pick GLM-OCR when you need Markdown, JSON or schema-based fields from PDFs and images, such as academic papers with formulas or forms. Pick OCRmyPDF when you need to make scanned PDFs searchable and keep them as PDF/A, because it adds a text layer and leaves the rest of the file alone. They solve different problems: one reads documents into structured text, the other adds a text layer to the original PDF.
GLM-OCRzai/glm-ocr | OCRmyPDFocrmypdf/ocrmypdf | |
|---|---|---|
| Type | Open source | Open source |
| Price | 6 credits / page | 1 credit / page |
| Per 1,000 pages | $6.00 | $1.00 |
| Typical speed | 1.3 s / page | 1.0 s / page |
| Best for | Low-cost general documents | Searchable PDFs from scans |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages | 100+ languages (via Tesseract) |
| Max pages per request | 500 | 1,000 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | 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 GLM-OCR if
- It outputs Markdown, JSON and plain text, and can extract fields into a user-defined JSON schema.
- It scores 94.62 on OmniDocBench v1.5 per its model card, and costs $0.03 per million tokens on the Z.ai API.
- It suits high-volume PDF to Markdown and academic papers with formulas, and you can use the API or self-host with vLLM, SGLang, Ollama or transformers.
Choose OCRmyPDF if
- It produces validated searchable PDF/A by default, which suits archiving and compliance workflows.
- It inserts the OCR layer losslessly where possible, without re-encoding other content.
- It runs on CPU only, spreads work across all cores, and covers 100+ languages through Tesseract language packs, at no cost beyond your compute.
Key differences
| GLM-OCR | OCRmyPDF | |
|---|---|---|
| What it produces | Markdown, JSON or plain text | Searchable PDF/A or plain text, with no layout, table or Markdown output |
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers | Local command-line tool only |
| Licence | MIT for the model weights; the SDK repo and PP-DocLayoutV3 are Apache-2.0 | MPL-2.0 |
| Price | API: $0.03 per million tokens for input and output; self-hosted is free apart from compute | Free, self-hosted; you pay for compute |
| Hardware | 0.9B parameter model; does not run on aarch64 Linux (issue #227) | CPU only, uses all cores |
| Benchmark | OmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent) | Not published |
| Known failure | Repeats output without a stop sequence (issue #220); drops table footer rows (issue #240); loses comma decimal separators in cropped tables (issue #241) | --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
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- GLM-OCR GitHub
- OCRmyPDF GitHub README
- OCRmyPDF docs
- Issue #1790 form fields
What each one is
OCRmyPDF
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.
PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?
Use one, fall back to the other
{"model": "zai/glm-ocr","fallbacks": ["ocrmypdf/ocrmypdf"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs RapidOCRGLM-OCR vs EasyOCRUnlimited OCR vs OCRmyPDFPaddleOCR-VL vs OCRmyPDFClaude vs OCRmyPDFOCRmyPDF vs KrakenGLM-OCR vs KrakenOCRmyPDF vs RolmOCR
GLM-OCR alternativesOCRmyPDF alternativesBest OCR models in 2026