OCRmyPDF
Adds an OCR text layer to scanned PDF files, making them searchable and accessible.
Why consider OCRmyPDF?
OCRmyPDF analyzes scanned PDF documents, performs optical character recognition (OCR) using Tesseract, and adds a searchable text layer while preserving original image quality.
Learn OCRmyPDF by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide3 sections
Overview of OCRmyPDF
OCRmyPDF transforms non-searchable scanned PDFs into fully searchable, accessible documents. Built in Python on top of Tesseract OCR, Ghostscript, and unpaper, it deskews pages, cleans scan artifacts, and inserts a transparent text layer over the original images.
Installing OCRmyPDF
Install via pip or package managers:
pip install ocrmypdf# or on macOS:brew install ocrmypdfRunning OCR on Scanned Documents
Process a scanned file and produce a searchable PDF/A:
ocrmypdf --deskew --clean input_scan.pdf searchable_output.pdfSpecify multi-language recognition:
ocrmypdf -l eng+fra input.pdf output.pdfOCRmyPDF is distributed under the Mozilla Public License Version 2.0 (MPL-2.0).
Related tools
More options with a similar category or technology profile.
diskus
Minimal, fast alternative to du -sh written in Rust using multi-threaded directory traversal.
peco
Simplistic interactive filtering tool for Unix pipelines, process lists, and file trees.
Dapr CLI
Command-line tool for managing Dapr distributed application runtime environments and sidecars.
Freeze
Generate beautiful image screenshots and SVGs of code snippets and terminal outputs.