Ebook Tools Directory/OCR and Document Extraction/OCRmyPDF
OCR and Document ExtractionVerified Authentic ReleaseMPL-2.0

OCRmyPDF

Adds an OCR text layer to scanned PDF files, making them searchable and selectable.

35,262 Stars2,449 ForksPythonRelease: v17.13.0

Tool Overview

OCRmyPDF rasterizes PDF files, runs optical character recognition using Tesseract OCR, and carefully overlays a searchable, invisible text layer precisely beneath the original scanned image. This preserves the visual integrity of historical books, research papers, and receipts while making them 100% searchable, copyable, and indexable.

System Requirements: Python 3.8+, Tesseract OCR, Ghostscript, and QPDF

Key Capabilities & Features

Generates searchable, high-resolution PDF/A compliant documents
Integrates Tesseract OCR supporting 100+ languages and custom dictionaries
Automatic deskewing, page rotation, and image cleanup prior to OCR
Sidecar text file generation for rapid indexing in search databases
Multi-core parallel processing for high-throughput batch conversions
Detects existing text layers to avoid redundant double-OCR processing

Package Manager & CLI Installation

Install and update OCRmyPDF using your preferred operating system package manager or container runtime:

$ brew install ocrmypdf

Verified Official Release Downloads

v17.13.0

All binaries are sourced directly from the official developer release assets without re-packaging or modifications.

Generic BinaryVerified
ocrmypdf-17.13.0-py3-none-any.whl
Size: 0.54 MBDownloads: 333
Download Generic
Generic BinaryVerified
ocrmypdf-17.13.0-py3-none-any.whl.sigstore.json
Size: 0.01 MBDownloads: 45
Download Generic
Generic BinaryVerified
ocrmypdf-17.13.0.tar.gz
Size: 7.33 MBDownloads: 488
Download Generic
Generic BinaryVerified
ocrmypdf-17.13.0.tar.gz.sigstore.json
Size: 0.01 MBDownloads: 38
Download Generic
Source Code ZIPVerified
ocrmypdf-v17.13.0-source.zip
Size: GitHub Archive
Download Source

Client-Side SHA-256 Binary Integrity Verifier

100% Client-Side. Verified locally in your browser using the Web Crypto API. No files are uploaded.

Drag & drop downloaded binary here, or browse file

Computes SHA-256 hash in real-time to guarantee file authenticity against developer releases.

Security Verification Status: Verified High-Trust Utility

Downloads link directly to the official GitHub releases hosted by ocrmypdf/OCRmyPDF. Files are checked for authentic digital developer signatures and verified against open-source repository tags.

Latest Release Changelog (v17.13.0)

**Changes** - PDF/A made without Ghostscript ("speculative" conversion) is now validated with pikepdf's PDF/A support (`pikepdf.pdfa`) instead of veraPDF, and the final output is validated again after the metadata and optimization steps. veraPDF is no longer used, so the Ghostscript-free path is available whether or not veraPDF is installed, including in the Docker image. Files the validator does not approve go to Ghostscript as before; run with `-v1` to see why. - Speculative conversion now supports PDF/A-1b, and repairs common problems that previously always sent a file to Ghostscript: it replaces other output intents with sRGB, removes image interpolation flags, sets the Print flag on annotations, adds the `/CIDSet` PDF/A-1 requires, and removes XMP properties and hidden annotations that PDF/A does not permit. - New option `--pdfa-backend {auto,ghostscript,internal}` (API: `pdfa_backend=`). `auto`, the default, tries OCRmyPDF's own conversion and then Ghostscript. `internal` never uses Ghostscript, so JPEGs pass through unchanged; if the result is not approved, the `pdfa` output types fail with exit code 10 and `--output-type auto` outputs a regular