
OCRmyPDF
Make scanned PDFs searchable and copy-pasteable in one command.
Replaces Abbyy Finereader Pdf, Adobe Acrobat

Who it's for
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.
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.
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.
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.
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.
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.
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.
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
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 works
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.
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.
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.
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.
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.
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.
Features
- Tesseract OCR engine with 100+ language support
- Lossless OCR text overlay
- PDF/A output for long-term archiving
- Auto-deskew and image cleanup
- Multi-core parallel processing
- PDF image optimization
How to install
Install OCRmyPDF using your system package manager or pip.
apt install ocrmypdf
brew install ocrmypdf
pip install ocrmypdfRecommended for this setup
Strengths
- Over a decade of active development: OCRmyPDF 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 managers: No 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 use: The 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 engines: The 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 interface: OCRmyPDF 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 installs: The 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-intensive: Processing 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.
Tech stack
FAQ
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.
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.
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`.
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.
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.