ocrmypdf

Install command:
brew install ocrmypdf

Adds an OCR text layer to scanned PDF files

https://ocrmypdf.readthedocs.io/en/latest/

License: MPL-2.0

Development: Pull requests

Formula JSON API: /api/formula/ocrmypdf.json

Formula code: ocrmypdf.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 17.13.0

Depends on:

cryptography 50.0.2 Cryptographic recipes and primitives for Python
freetype 2.14.3 Software library to render fonts
ghostscript 10.08.0 Interpreter for PostScript and PDF
img2pdf 0.6.3 Convert images to PDF via direct JPEG inclusion
jbig2enc 0.32 JBIG2 encoder (for monochrome documents)
libheif 1.23.6 ISO/IEC 23008-12:2017 HEIF file format decoder and encoder
libpng 1.6.59 Library for manipulating PNG images
pillow 12.3.0 Friendly PIL fork (Python Imaging Library)
pngquant 3.0.3 PNG image optimizing utility
pybind11 3.1.0 Seamless operability between C++11 and Python
pydantic 2.13.5 Data validation using Python type hints
python@3.14 3.14.8 Interpreted, interactive, object-oriented programming language
qpdf 12.4.2 Tools for and transforming and inspecting PDF files
rpds-py 2026.9.1 Python bindings to Rust's persistent data structures
tesseract 5.5.3 OCR (Optical Character Recognition) engine
unpaper 7.0.0 Post-processing for scanned/photocopied books

Depends on when building from source:

cmake 4.4.4 Cross-platform make
pkgconf 3.0.7 Package compiler and linker metadata toolkit

Uses from macOS: libffi, libxml2 (since macOS Ventura), libxslt

Binaries: ocrmypdf

Analytics:

30 days90 days365 days
Installs3,31315,29063,851
Installs (--HEAD)727122
Installs on Request3,31315,28963,739
Installs on Request (--HEAD)727122
Build Errors1