Skip to main content

OCRmyPDF

Editor’s pick

Local OCR (command line)

Open-source command-line tool that adds a searchable OCR text layer to scanned PDFs.

Main category
OCR
Cost
See the official site for cost
Licence type
Open source
Platforms
Windows / macOS / Linux
Visit OCRmyPDF Code repository

Version-watched: add it to favourites and confirmed new releases will show on your favourites page (stored in this browser only).

Editor’s pick for PDF / OCR · Local OCR (command line)

Good for
People who need to make many scanned PDFs searchable and want the files to stay on their own computer.
Why it is recommended
Adds a searchable, copyable text layer to scanned PDFs, keeps the original image resolution and can write PDF/A. Recognition uses Tesseract with selectable languages, which suits scripted batch processing.
Limits and when to choose something else
Command line only; Tesseract and Ghostscript must be installed first (or use Docker). Recognition quality depends on scan quality and language data, so spot-check the output. If you need a graphical interface, choose another tool.

Sources checked: 2026-11-05 · Compiled from official sources; not run by ZIRULAB

Compare with similar tools

Related articles and guides

What it is for and who it suits

Anyone who needs scanned papers, reports or archives to become searchable and copyable, and is comfortable with the command line.

How it is used · Where data is processed

How it is used
Command line
Where data is processed
On your computer

Runs on your computer using locally installed Tesseract and Ghostscript; the official description says it “keeps your private data private”.

Getting started: Add a searchable text layer to a scanned PDF

Steps compiled from the official documentation and interface; not run by ZIRULAB. Practise with demo data.

  1. Install OCRmyPDF as described officially (pip, apt, Homebrew or Docker, for example) and make sure the Tesseract language data you need is installed.
  2. Prepare a scanned PDF without sensitive content, e.g. scan.pdf.
  3. In a terminal run: ocrmypdf -l eng scan.pdf scan_ocr.pdf (join several languages with +, e.g. -l eng+fra; add --output-type pdfa for archival output).
  4. Open scan_ocr.pdf in a PDF reader, search for a few words, copy a passage and compare it with the image to judge recognition quality.

Frequently asked questions

Does OCRmyPDF have a graphical interface?
It is positioned as a scriptable command-line program. If you need a GUI, choose another OCR tool.
Does it change the original images?
Officially it keeps the exact resolution of the embedded images and places the text under them. Output goes to a new file, so the original is not replaced as long as you use a different file name.
Does it handle Chinese or Japanese?
Recognition is done by Tesseract, which supports more than 100 languages; install the language data and pass it with -l.

Details

OCRmyPDF is an open-source command-line tool that adds an OCR text layer to scanned PDFs so they can be searched, copied and archived long term. It is often used with Tesseract OCR and suits batch processing of scanned literature, archives and lab records.

Use cases: OCR for scanned PDFs, batch literature processing, archive digitisation, making PDFs searchable

Recommended combination: OCRmyPDF + Tesseract OCR

Choosing between similar tools

  • Tesseract OCR: OCRmyPDF uses Tesseract for recognition; to recognise text in images without producing a PDF, use Tesseract directly.
  • PaddleOCR: For mainly Chinese documents, tables and layout analysis, compare PaddleOCR.

Used in these research workflows

Sources and scope of the check

Checked 2026-11-05 · Compiled from official sources; not run by ZIRULAB