--- id: ocrmypdf version: "17.10.0" license: MPL-2.0 license_treatment: copyleft maintenance: active --- # ocrmypdf — OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched License: copyleft · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does OCRmyPDF is a command-line tool that takes scanned PDFs or images and adds an invisible searchable text layer using Tesseract OCR, making the content copy-pasteable and indexable. It preserves the original image resolution, optionally deskews crooked pages, cleans images before OCR, and can convert output to PDF/A format for long-term archival. The tool validates both input and output, distributes work across available CPU cores, and supports over 100 languages through Tesseract's language packs. The package wraps Tesseract OCR and Ghostscript into a Python interface with 13 runtime dependencies including pikepdf for PDF manipulation, pillow for image handling, pydantic for configuration, and rich for CLI output. It runs on Linux, macOS, Windows, and FreeBSD. The tool is designed for batch processing and scales to handle files with thousands of pages; it keeps processed data private and does not require network access. Use it for: - Digitize paper documents or scanned PDFs to make them searchable and copy-pasteable for archival or document management systems. - Batch convert image files (JPG, PNG) to single-page searchable PDFs for integration into document workflows. - Prepare scanned documents for long-term storage by converting to PDF/A format with embedded OCR text. - Straighten and clean crooked or low-quality scans before OCR to improve recognition accuracy. - Process multilingual documents by specifying multiple language codes (e.g., eng+fra) to recognize mixed-language content. - Optimize PDF file sizes while adding OCR, reducing storage overhead for large document collections. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. OCRmyPDF adds searchable text layers to scanned PDF files using Tesseract OCR, enabling them to be searched and copy-pasted while optionally deskewing, cleaning, and converting to PDF/A format. Yes. OCRmyPDF is actively maintained, widely used (top 5000 PyPI packages, 1.17M monthly downloads), has no known vulnerabilities, and solves a specific, well-defined problem. Low install friction and copyleft licensing pose no barrier for most users. The main prerequisite—external system binaries (Tesseract, Ghostscript)—is clearly documented and available across major platforms. Install it if you need to make scanned PDFs searchable. ## Install pip install ocrmypdf uv add ocrmypdf poetry add ocrmypdf ## Installing ocrmypdf Before you install: Low friction: pure Python wheel with 13 runtime dependencies. Active maintenance—last release 9 days ago, repository at 34446 stars with recent commits. Requires external system binaries (Tesseract OCR and Ghostscript) to function. License in practice: MPL-2.0 (copyleft): you may use and modify the package freely, but any modifications you distribute must be released under the same license. Suitable for most commercial and open-source projects, though distribution of modified versions carries obligations. Quickstart: pip install ocrmypdf ocrmypdf -l eng input_scanned.pdf output_searchable.pdf Requires Tesseract OCR and Ghostscript to be installed and available on PATH; Python >=3.11 required. Verify before relying: - Performance characteristics on large multi-page documents (fact sheet mentions thousands of pages but provides no benchmarks). - Actual file size reduction from image optimization (description claims files often smaller than input but no metrics given). - Accuracy of OCR output across the 100+ supported languages (language support confirmed but quality variance unknown). ## Package facts - License: MPL-2.0 (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags add OCR text layer to PDF, make scanned PDF searchable, tesseract OCR wrapper, PDF text recognition, convert image to searchable PDF, deskew and OCR PDF, PDF/A conversion tool, ocr, pdf-processing, document-digitization [View on SkillFed](https://skillfed.io/packages/ocrmypdf) · [View on PyPI](https://pypi.org/project/ocrmypdf/)