talira

OCRmyPDF

Adds a searchable OCR text layer to scanned PDFs

open sourceMPL-2.0self-hostablefree

OCRmyPDF is a command-line program and Python library that adds an invisible OCR text layer under the images of scanned PDFs, so they can be searched and copy-pasted, and outputs PDF/A by default. It uses Tesseract (100+ languages) for recognition, keeps the original image resolution, can deskew, rotate and clean pages, optimizes images (often producing smaller files), and spreads work across all CPU cores. Its own code is MPL-2.0, but it relies on external programs: Tesseract (Apache-2.0) and, for rasterizing, either pypdfium2 or Ghostscript (AGPL-3.0); since version 17 Ghostscript is optional but still needed for some PDF/A conversions.

Ways to install

App stores

Problems it solves

  • I scanned 10 years of paperwork and can't search any of it
  • ctrl+F finds nothing in the PDFs that come off our office scanner
  • make scanned contracts copy-pasteable without retyping them
  • the scanner saves pages crooked and sideways, straighten them automatically
  • free OCR for PDFs that runs offline on a Linux box
  • turn scanned documents into PDF/A for long-term archiving
  • watch a folder and make every new scan searchable automatically
  • Adobe's OCR makes the files huge and blurry; I want the images untouched
  • OCR French and German documents together in one pass
  • add a text layer to a scanned PDF before we feed it to our text extraction step
  • batch process thousands of scanned pages using all CPU cores

Features

  • searchable PDF/A output from scanned PDFs
  • OCR text placed under the image for accurate copy/paste
  • keeps the original resolution of embedded images
  • deskew, rotate and clean pages
  • image optimization (pngquant, JBIG2)
  • multi-core processing
  • Tesseract OCR in 100+ languages; RapidOCR alternative engine
  • plugin interface to replace or extend OCR engines
  • Docker images (x64 and ARM)

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known
Has official SDKsplan not known

Alternatives

The same job

These do what OCRmyPDF does.

  1. Stirling-PDF Your PDFs. Your servers.
  2. PyMuPDF A high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
  3. Docling Get your documents ready for gen AI
  4. Tesseract Tesseract Open Source OCR Engine
  5. Amazon Textract Automatically extract printed text, handwriting, layout elements, and data from any document
  6. EasyOCR Ready-to-use OCR with 80+ supported languages and all popular writing scripts

Compare OCRmyPDF with the top 3