OCRmyPDF vs Florence-2
Pick OCRmyPDF to make scanned PDF archives searchable and keep them as PDF/A. Pick Florence-2 when you need text with bounding boxes from short English labels or scene text, or when the same model must also do detection. Neither gives you Markdown, tables or reliable handwriting.
OCRmyPDFocrmypdf/ocrmypdf | Florence-2microsoft/florence-2 | |
|---|---|---|
| Type | Open source | Open source |
| Price | 1 credit / page | 1 credit / page |
| Per 1,000 pages | $1.00 | $1.00 |
| Typical speed | 1.0 s / page | 0.8 s / page |
| Best for | Searchable PDFs from scans | Lightweight OCR with boxes |
| Inputs | PDF, images | images |
| Languages | 100+ languages (via Tesseract) | English |
| Max pages per request | 1,000 | 500 |
| Tables | No | No |
| Handwriting | No | No |
| Math | No | No |
| Bounding boxes | No | ✓ Yes |
| Confidence | No | No |
| Forms | No | No |
| Multilingual | ✓ Yes | No |
| 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
- It outputs validated searchable PDF/A by default, which suits archiving and compliance workflows.
- It adds the OCR layer losslessly where possible, without re-encoding other page content.
- It covers 100+ languages through Tesseract language packs and runs on CPU only, spread across all cores.
Choose Florence-2 if
- It returns quadrilateral boxes per text line with OCR_WITH_REGION, which a PDF text-layer tool does not give you.
- It is small at 0.23B (base) or 0.77B (large) parameters and MIT licensed, so it suits lightweight edge OCR in English.
- The same model also does captioning, detection and grounding, so one model can serve a mixed pipeline.
Key differences
| OCRmyPDF | Florence-2 | |
|---|---|---|
| What it is | Command-line tool that adds a Tesseract text layer to scanned PDFs | Prompt-based vision model with OCR and OCR with regions, plus captioning and detection |
| Licence | MPL-2.0 | MIT |
| How you run it | Local library/CLI, CPU only, parallel across all cores | Self-hosted via Transformers, 0.23B base or 0.77B large |
| Output | Searchable PDF/A and plain text | Plain text and bounding boxes |
| Languages | 100+ via Tesseract language packs | Weak on CJK: Chinese output mostly wrong because the vocabulary lacks CJK characters. Spelling errors and missing spaces seen on French text |
| Handwriting | Not suited to handwriting | Spelling errors and missing spaces on cursive handwriting in a Hugging Face blog test |
| Known failure | File size can double or quadruple with --deskew --clean-final; --skip-text with default PDF/A removes form fields; hangs on PDFs whose forms share one Resources dictionary | No Markdown, tables or LaTeX; the continued-pretrained checkpoint used only 0.1B samples and might not be well trained |
Sources
- OCRmyPDF GitHub README
- Issue #948 file size
- Issue #1790 form fields
- Issue #1763 hang
- Florence-2-large model card
- HF discussion Chinese very bad
What each one is
OCRmyPDF
Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.
OCRmyPDF detailsFlorence-2
Small Microsoft vision model (0.23B and 0.77B) with OCR and OCR-with-regions tasks that return text with boxes.
Florence-2 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": "ocrmypdf/ocrmypdf","fallbacks": ["microsoft/florence-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
OCRmyPDF vs Tesseract.jsOCRmyPDF vs Typhoon OCRRapidOCR vs Florence-2EasyOCR vs Florence-2LlamaParse vs Florence-2PaddleOCR (PP-OCR) vs Florence-2EasyOCR vs OCRmyPDFOCRmyPDF vs InternVL3.5
OCRmyPDF alternativesFlorence-2 alternativesBest OCR models in 2026