Productivity & ResearchOpen source codeocrmypdf/OCRmyPDF

OCRmyPDF: Open Source AI Repository & Self-Hosting Guide

Open-source CLI and Python automation tool adding an accurate searchable OCR text layer to scanned PDFs while preserving vector quality and generating PDF/A.

GitHub Stars
35,466 stars
Repository License
MPL-2.0
Last Push (UTC)
Dec 2, 2026
Check the repo's license. Model weights may have a different license.
git clone https://github.com/ocrmypdf/OCRmyPDF.git
View on GitHub
Installbrew install ocrmypdf

OCRmyPDF: Architecture & Practical Workflow

OCRmyPDF orchestrates Ghostscript, QPDF, Pillow, and Tesseract OCR cleanly across CPU cores—auto-rotating skewed pages (`--rotate-pages`), deskewing scans (`--deskew`), optimizing file size, and outputting archival PDF/A files without altering clean digital text.

Recommended End-to-End Pipeline

Watch a scanner drop folder and run `ocrmypdf --skip-text --deskew --optimize 1 scan.pdf searchable.pdf` before archiving into Paperless-ngx.

Runtime Target
Command line / Python (GitHub)
Primary Users
Archivists, Office workflows
Code License
MPL-2.0
Focus Topics
open-source, github, ocr, pdf, self-hosted

Quick Setup & Installation Steps

Platform target: Command line / Python (GitHub). Always verify environment variables and dependencies in the upstream repository README.

  1. 1Clone the repository from GitHub: `git clone https://github.com/ocrmypdf/OCRmyPDF.git && cd OCRmyPDF`.
  2. 2Review the MPL-2.0 license (Check the repo's license. Model weights may have a different license.) and note any separate terms on external model weights.
  3. 3Install or launch the project directly: `brew install ocrmypdf` (use an isolated Python virtualenv, Node workspace, or Docker volume so dependencies remain clean).
  4. 4Validate end-to-end behavior with a small sample input (Watch a scanner drop folder and run `ocrmypdf --skip-text --deskew --optimize 1 scan.pdf searchable.pdf` before archiving into Paperless-ngx.)

Hardware & VRAM Notes

Runs on standard developer workstations without specialized hardware unless loading large local weights.

CPU & Memory

Modern multi-core CPU with 8 GB–16 GB RAM for orchestration, CLI agents, OCR/document parsing, or UI workflows (32 GB+ if co-hosting large local LLMs).

GPU / VRAM

Optional unless running local neural weights; pairs cleanly with local inference servers (Ollama / llama.cpp) or remote endpoints.

Runtime Target

Command line / Python (GitHub)

Strengths & Best For

  • Searchable PDFs
  • Batch processing
  • Keeps the original look
  • Best suited for: Archivists, Office workflows

Limitations & Caveats

  • Command-line tool
  • Output quality depends on the scan
  • Check the repo's license. Model weights may have a different license.

3 Similar Tools on /tools (Productivity)

Prefer a hosted web app instead of managing local weights or Docker containers? Explore these cloud alternatives.

Browse all tools
Self-Hosted OCRmyPDF vs. Hosted Alternatives (n8n Workflow Automation & Mapify (ChatMind))
FactorOCRmyPDF (Self-Hosted)n8n Workflow AutomationMapify (ChatMind)
Execution & PrivacyRuns locally via Command line / Python (GitHub); data stays on your disk or private server.Hosted cloud web interface; zero local dependency setup required.Hosted cloud web interface; zero local dependency setup required.
Cost & QuotaMPL-2.0 code; bound only by local CPU/GPU hardware.Open Source; subject to vendor free-tier limits or paid plans.Freemium; subject to vendor free-tier limits or paid plans.
Primary FitSearchable PDFs; Batch processingFair-code workflow automation tool with native AI agents & vector DB connectors.Convert long text, YouTube videos, and PDFs into structured visual mind maps.
Key Trade-offCommand-line toolRequires internet access and vendor account/quota limits.Requires internet access and vendor account/quota limits.

Matching Ready-Made Prompts

All Prompts →

Customize variables in Live Prompt Studio for OCRmyPDF workflows.

NotebookLM Multi-Source Deep Literature ReviewExtraction · Research, Literature Review, Synthesis, Academic
Open in Studio
Competitor Pricing & Feature Teardown Grid from Multiple SourcesExtraction · Competitive Intelligence, Pricing, Market Research
Open in Studio
Universal Invoice & Receipt Structured JSON ParserExtraction · Invoice, Accounting, JSON, Automation
Open in Studio

More Open Source Productivity & Research Repositories

Frequently Asked Questions

What does OCRmyPDF do and how does it work?

OCRmyPDF (ocrmypdf/OCRmyPDF) is an open-source productivity & research project with 35,466 stars on GitHub. Open-source CLI and Python automation tool adding an accurate searchable OCR text layer to scanned PDFs while preserving vector quality and generating PDF/A. OCRmyPDF orchestrates Ghostscript, QPDF, Pillow, and Tesseract OCR cleanly across CPU cores—auto-rotating skewed pages (`--rotate-pages`), deskewing scans (`--deskew`), optimizing file size, and outputting archival PDF/A files without altering clean digital text.

Is OCRmyPDF free to self-host and use commercially?

OCRmyPDF provides open source code licensed under MPL-2.0. Check the repo's license. Model weights may have a different license. Always verify both source code and model weight licenses in the GitHub repository before commercial deployment.

What hardware, runtime, or VRAM does OCRmyPDF require?

OCRmyPDF targets Command line / Python (GitHub). Typical installation runs via `brew install ocrmypdf`. Command-line tool

How does self-hosting OCRmyPDF compare to hosted tools like n8n Workflow Automation?

Self-hosting OCRmyPDF gives you full local data control, zero per-usage vendor fees, and customizable Command line / Python (GitHub) pipelines—at the cost of managing your own setup and compute. By contrast, n8n Workflow Automation (Open Source) runs in the browser with no local installation, though usage quotas and cloud privacy policies apply.

Is OCRmyPDF actively maintained and what workflow fits it best?

Repository metadata records 35,466 stars on GitHub with the latest recorded push on Dec 2, 2026. Watch a scanner drop folder and run `ocrmypdf --skip-text --deskew --optimize 1 scan.pdf searchable.pdf` before archiving into Paperless-ngx.