macOS
brew install ocrmypdflocal Homebrew formula metadata
sudo port install ocrmypdfMacPorts ports tree · textproc/ocrmypdf/Portfile · source: api.github.com
brew
Adds an OCR text layer to scanned PDF files. Version 17.8.0 via Homebrew; verified 2026-07-02.
install
brew install ocrmypdflocal Homebrew formula metadata
sudo port install ocrmypdfMacPorts ports tree · textproc/ocrmypdf/Portfile · source: api.github.com
sudo apk add ocrmypdfAlpine Linux edge package indexes · ocrmypdf · source: dl-cdn.alpinelinux.org
sudo apt install ocrmypdfDebian stable package indexes · ocrmypdf · source: deb.debian.org
sudo dnf install ocrmypdfFedora Rawhide package metadata · ocrmypdf · source: dl.fedoraproject.org
nix profile install nixpkgs#ocrmypdfnixpkgs package indexes · ocrmypdf · source: raw.githubusercontent.com
sudo zypper install python311-ocrmypdfopenSUSE Tumbleweed package metadata · python311-ocrmypdf · source: download.opensuse.org
overview
Adds an OCR text layer to scanned PDF files
history
OCRmyPDF is a Python command-line application and library that adds an OCR text layer to scanned PDF files, making image-based documents searchable and copyable while preserving the original page images where possible.
The project’s documentation frames OCRmyPDF around an awkward document-processing gap: PDF is the normal container for scanned documents, but existing scanned PDFs are difficult to modify. OCRmyPDF automates the pipeline of rasterizing pages, running OCR, inserting an invisible text layer, and writing a validated PDF or PDF/A output.
PyPI release history shows OCRmyPDF 3.0 published on 2015-09-05 and 4.2.2 on 2016-08-31, already advertising searchable PDF/PDF-A generation and preservation of embedded image resolution. Later documentation describes a public API, plugin support, image optimization, language packs, Docker usage, and feature-specific release notes, showing its expansion from a practical CLI into a packaged document-processing toolkit.
OCRmyPDF’s adoption follows the shape of the scanned-document problem: Linux, macOS, and distribution packagers ship it because it wraps several hard-to-coordinate pieces into one reproducible CLI. The project is available through PyPI and package managers including Homebrew, Debian/Ubuntu, Fedora, MacPorts, Nix, Alpine, and openSUSE-family packages.
The project’s packaging notes thank downstream packagers and point to broad porting status, while the README badges and package metadata show attention to PyPI, Homebrew, Read the Docs, and Python-version compatibility. That packaging breadth is part of its appeal: users can install a single command rather than hand-assemble Tesseract, Ghostscript or pypdfium2, image preprocessing, PDF/A conversion, metadata handling, and validation steps.
The common workflow is `ocrmypdf input.pdf output.pdf`, with options for languages, page rotation, deskewing, cleaning, metadata, job parallelism, output type, PDF optimization, and redoing or skipping existing OCR. The README emphasizes searchable PDF/A output, accurate placement of OCR text below images, lossless insertion where possible, image optimization, input/output validation, Tesseract language support, and scaling to large PDFs.
The project is also used as a library or scripted tool in document-ingestion systems. Its public API and plugin documentation exist for callers that need OCRmyPDF behavior inside larger PDF processing flows rather than only from a shell.
OCRmyPDF is packaging glue with real teeth: it turns a fragile OCR/PDF toolchain into one command while still exposing dependency choices, language-data packaging, Docker images, plugin hooks, and PDF/A policy. It is a good package-nerd example of a Python CLI whose value is orchestrating native tools and file-format edge cases cleanly.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
ocrmypdf | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://ocrmypdf.readthedocs.io/en/latest/
install metadata
| Package key | brew:ocrmypdf |
|---|---|
| Version | 17.8.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/ocrmypdf |
| Homepage | https://ocrmypdf.readthedocs.io/en/latest/ |
| Repository | https://github.com/ocrmypdf/OCRmyPDF |
| Upstream docs | https://ocrmypdf.readthedocs.io/en/latest |
| License | MPL-2.0 |
| Source archive | https://files.pythonhosted.org/packages/4b/c4/c44db9ff5282e7c73856f437434777745d18bb9404f431df70e786a6bcc7/ocrmypdf-17.8.0.tar.gz |
| Last updated | 2026-07-02T12:13:48Z |
| Pulse | updated |
| Dependencies | cryptography, freetype, ghostscript, img2pdf, jbig2enc, libheif, libpng, pillow, pngquant, pybind11, pydantic, python@3.14, qpdf, tesseract, unpaper |
| Build dependencies | cmake, pkgconf |
| Uses from macOS | libffi, libxml2, libxslt |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | ocrmypdf |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
ocrmypdf 16.7.0+dfsg1-3
add an OCR text layer to PDF files
https://github.com/jbarlow83/OCRmyPDF
sudo apt install ocrmypdfocrmypdf-doc 16.7.0+dfsg1-3
add an OCR text layer to PDF files - documentation
https://github.com/jbarlow83/OCRmyPDF
sudo apt install ocrmypdf-dococrmypdf
nix profile install nixpkgs#ocrmypdfocrmypdf 15.2.0+dfsg1-1
add an OCR text layer to PDF files
https://github.com/jbarlow83/OCRmyPDF
sudo apt install ocrmypdfocrmypdf-doc 15.2.0+dfsg1-1
add an OCR text layer to PDF files - documentation
https://github.com/jbarlow83/OCRmyPDF
sudo apt install ocrmypdf-dococrmypdf 16.11.1-r2
Add OCR text layer to scanned PDF files
https://github.com/ocrmypdf/OCRmyPDF
sudo apk add ocrmypdfocrmypdf-pyc 16.11.1-r2
Precompiled Python bytecode for ocrmypdf
https://github.com/ocrmypdf/OCRmyPDF
sudo apk add ocrmypdf-pycocrmypdf 16.12.0-3.fc45
Add an OCR text layer to scanned PDF files
https://github.com/ocrmypdf/OCRmyPDF
sudo dnf install ocrmypdfocrmypdf+watcher 16.12.0-3.fc45
Metapackage for ocrmypdf: watcher extras
https://github.com/ocrmypdf/OCRmyPDF
sudo dnf install ocrmypdf+watcherocrmypdf-doc 16.12.0-3.fc45
ocrmypdf documentation
https://github.com/ocrmypdf/OCRmyPDF
sudo dnf install ocrmypdf-docpython311-ocrmypdf 17.4.2-1.1
OCRmyPDF adds an OCR text layer to scanned PDF files
https://github.com/ocrmypdf/OCRmyPDF
sudo zypper install python311-ocrmypdfpython313-ocrmypdf 17.4.2-1.1
OCRmyPDF adds an OCR text layer to scanned PDF files
https://github.com/ocrmypdf/OCRmyPDF
sudo zypper install python313-ocrmypdfpython314-ocrmypdf 17.4.2-1.1
OCRmyPDF adds an OCR text layer to scanned PDF files
https://github.com/ocrmypdf/OCRmyPDF
sudo zypper install python314-ocrmypdfocrmypdf
sudo port install ocrmypdfsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.