
Who OCRmyPDF is for#
Archivists and records managers digitizing documents
OCRmyPDF turns image-only scans into searchable, long-term archivable PDF/A files in one command. For a batch of 1,000 scanned pages, the tool parallelizes across CPU cores and validates every output file. The default PDF/A output meets archival standards without additional post-processing.
Skip if:
You need a polished GUI workflow for non-technical staff or per-page review before filing. OCRmyPDF is a batch processor; individual-document review flows work better in a tool like Adobe Acrobat.
Developers building document management pipelines
OCRmyPDF is scriptable and integrates into automated workflows. It pairs directly with paperless-ngx, which uses it for document ingestion. Any pipeline that receives PDF scans and needs to index or extract their content can call OCRmyPDF as a subprocess with structured output paths.
Skip if:
Your pipeline needs to extract structured data (tables, form fields) or produce machine-readable JSON output alongside the OCR. OCRmyPDF outputs PDFs with text layers, not structured data formats.
Small teams replacing paid OCR subscriptions
Teams paying for Adobe Acrobat or ABBYY FineReader primarily to add OCR to scanned PDFs can cover that use case with OCRmyPDF at no per-seat cost. It installs on a shared server and processes files via a watched folder or a simple script.
Skip if:
Your team needs the full Adobe Acrobat feature set (form creation, digital signatures, PDF editing) or ABBYY's advanced table and form extraction. OCRmyPDF adds OCR text layers; it is not a full PDF editor.
Self-hosters running paperless document workflows
OCRmyPDF integrates natively with paperless-ngx and similar self-hosted document management systems. Running it locally means scanned documents never leave the machine, which matters for personal financial records, medical documents, or legal files.
Skip if:
You want a fully managed, zero-maintenance OCR service. OCRmyPDF requires a local Python runtime and the Tesseract/Ghostscript dependencies; a hosted cloud OCR API is simpler if infrastructure management is the concern.
The problem it solves#
Scanned documents are images: you can display them but not search, copy, or index the text inside them. For anyone handling high volumes of scanned PDFs, such as offices digitizing paperwork, legal teams archiving contracts, or individuals scanning personal records, this creates a real workflow pain. Finding information means scrolling page by page; automated systems cannot extract data from the files; accessibility tools cannot read them aloud.
The tools available to fix this either cost money (Adobe Acrobat charges by license, ABBYY FineReader requires per-seat subscriptions), break copy/paste by misplacing the text layer, silently degrade image resolution, or output files that fail PDF/A validation and cannot be stored for long-term archiving. Command-line alternatives that existed before OCRmyPDF were largely unmaintained or produced unreliable output on multilingual or accented text.
How it solves it#
Tesseract OCR engine with 100+ language support
Runs the Tesseract 4.1.1+ OCR engine, which recognizes text in over 100 languages. Pass multiple language codes with `-l eng+fra` for bilingual documents. Language packs install from standard system repositories on Debian, Fedora, Arch, and macOS.
Lossless OCR text overlay
Inserts the OCR text layer without modifying any other part of the file. The original image pixels are untouched, resolution is preserved, and the text appears precisely behind the image for accurate copy and paste. Pages with existing text layers are handled without double-processing.
PDF/A output for long-term archiving
By default, OCRmyPDF outputs PDF/A, the ISO standard format for archiving. PDF/A ensures the file will render identically decades from now by embedding fonts and color profiles. Use `--output-type pdf` if you need a regular PDF instead.
Auto-deskew and image cleanup
Pass `--deskew` to automatically straighten crooked pages before OCR runs. Pass `--clean` to remove noise from the image using unpaper. Both options improve recognition accuracy on lower-quality scans without requiring image editing beforehand.
Multi-core parallel processing
Distributes work across all available CPU cores using `--jobs N`. A batch of 100 scanned pages processes significantly faster on a multi-core machine than single-threaded alternatives. The tool scales to handle files with thousands of pages.
PDF image optimization
OCRmyPDF often produces output files smaller than the input by compressing embedded images without visible quality loss. This is useful when processing scans saved at unnecessarily high DPI or with suboptimal compression settings.
Strengths and trade-offs#
Strengths
- Over a decade of active developmentOCRmyPDF has been in active development since 2013 and has over 35,000 GitHub stars with more than 2,400 forks. The last commit was in October 2026. At this level of maturity, the edge cases that break OCR pipelines have been encountered and fixed many times.
- Installs from standard package managersNo Docker required for most systems. `apt install ocrmypdf` on Debian/Ubuntu, `brew install ocrmypdf` on macOS, `dnf install ocrmypdf` on Fedora. The Snap package, pip, and Docker images also exist. This breadth of install paths means OCRmyPDF fits into existing automation without a custom setup.
- MPL-2.0 license permits commercial pipeline useThe Mozilla Public License 2.0 lets you integrate OCRmyPDF into commercial and closed-source pipelines. The requirement is to publish source-level changes you make to OCRmyPDF itself; your surrounding commercial code is unaffected. Unlike AGPL, using OCRmyPDF in a larger proprietary pipeline does not trigger source-disclosure requirements for your code.
- Plugin architecture for alternative OCR enginesThe plugin interface allows replacing the default Tesseract engine. Available plugins include OCRmyPDF-EasyOCR (PyTorch-based, GPU-accelerated), OCRmyPDF-AppleOCR (Apple Vision Framework on macOS), and OCRmyPDF-PaddleOCR (GPU-accelerated via PaddleOCR). You can swap engines without changing your pipeline's interface.
Trade-offs
- -CLI only, no graphical interfaceOCRmyPDF is a command-line tool with no graphical interface. For one-off conversions, users must be comfortable in a terminal. Batch automation is straightforward, but occasional personal users expecting a click-to-convert experience will need a wrapper script or a separate GUI front-end.
- -Requires Tesseract and Ghostscript as separate installsThe tool does not bundle its own OCR engine. Tesseract and Ghostscript must be installed separately before OCRmyPDF works. On managed servers or minimal Docker images, this adds setup steps. Outdated Tesseract versions can cause recognition quality issues or command failures.
- -High-resolution scans are memory-intensiveProcessing very high resolution scans (400 DPI and above) creates large intermediate rasterized images. On low-memory machines, batch processing many large scans can exhaust available RAM or disk space. The `--jobs` flag should be tuned down on constrained hardware.
OCRmyPDF vs alternatives#
OCRmyPDF vs Adobe Acrobat
Both add OCR to scanned PDFs, but they target different workflows. Adobe Acrobat is a full PDF editor with a graphical interface; OCRmyPDF is a command-line OCR layer tool built for automation and batch processing.
| Feature | OCRmyPDF | Adobe Acrobat |
|---|---|---|
| License | MPL-2.0 (open source) | Proprietary |
| Self-hosting | Yes | No |
| GUI | None | Yes |
| OCR languages | 100+ (Tesseract) | 40+ |
| PDF/A output | Yes (default) | Yes |
| Batch automation | CLI/scriptable | Limited |
| Cost | Free | ~$239/year |
OCRmyPDF is the stronger choice for automated batch processing, pipeline integration, and scenarios where document contents must stay on local infrastructure. Adobe Acrobat covers use cases OCRmyPDF does not: editing PDF content, creating fillable forms, adding digital signatures, and redacting sensitive information. If your team's primary need is adding searchable text to scanned PDFs at scale, OCRmyPDF handles that without a subscription.
OCRmyPDF vs ABBYY FineReader PDF
ABBYY FineReader PDF is an OCR and PDF conversion tool aimed at enterprise document workflows. OCRmyPDF covers the OCR-to-PDF use case; FineReader offers broader format conversion (PDF to Word, Excel, etc.) and a visual document editor.
| Feature | OCRmyPDF | ABBYY FineReader PDF |
|---|---|---|
| License | MPL-2.0 (open source) | Proprietary |
| Self-hosting | Yes | No |
| GUI | None | Yes |
| Export formats | PDF, PDF/A | PDF, Word, Excel, more |
| Cost | Free | ~$199/year |
ABBYY FineReader is the better fit when you need accurate conversion of scanned PDFs to editable Word or Excel documents, or when non-technical users need a point-and-click OCR experience. OCRmyPDF is the better fit for developers and sysadmins automating PDF ingestion at volume, where scripting and pipeline integration matter more than format conversion.
Quick start#
Install OCRmyPDF using your system package manager or pip.
```bash
apt install ocrmypdf
brew install ocrmypdf
pip install ocrmypdf
```What it's built on#
- Languages
- Python
FAQ#
Does OCRmyPDF work on Windows?
Yes. OCRmyPDF runs on Linux, macOS, Windows, and FreeBSD. On Windows, it works natively and also through Windows Subsystem for Linux. The Windows path requires Tesseract and Ghostscript installed separately, which OCRmyPDF detects automatically via the Windows Registry.
Can OCRmyPDF handle PDFs that already have some text?
By default, OCRmyPDF skips pages that already contain a text layer and only adds OCR to image-only pages. Use --force-ocr to re-OCR everything, or --skip-text to silently skip pages with existing text without errors.
What languages does OCRmyPDF support?
OCRmyPDF uses Tesseract, which supports over 100 languages. Install the appropriate Tesseract language pack (e.g., apt install tesseract-ocr-fra for French on Debian) and pass the language code with -l fra. Multiple languages can be specified together: -l eng+fra+deu.
Is OCRmyPDF free for commercial use?
Yes. OCRmyPDF is licensed under MPL-2.0, which permits commercial use. You can integrate it into commercial pipelines and proprietary products. The only requirement is publishing source-level changes you make to OCRmyPDF itself; your surrounding code is unaffected.
How does OCRmyPDF compare to using Tesseract directly?
Tesseract alone processes images and outputs text files; OCRmyPDF wraps it to handle PDF input, place the text layer accurately behind the image, optimize embedded images, validate output files, and produce PDF/A by default. Using OCRmyPDF instead of raw Tesseract avoids writing glue code for PDF handling, deskewing, and file validation.
Similar open-source tools#
Stirling PDF
Self-hosted PDF editor with 50+ tools for every PDF task
Okular
Multi-platform document viewer supporting PDF, EPUB, and more
PDFsam Basic
Split, merge, rotate, and extract PDF pages for free
PDF4QT
Open source PDF editor and viewer for Windows and Linux
rakazo
AI teammates you own: your keys, your model, your machine.
Atomic Agent
Local-first AI agent that runs on your machine, drives real tools.

