{"schemaVersion":"1.0","record":{"label":"OCRmyPDF","description":"Command-line PDF OCR pipeline that adds searchable text, with configurable image processing and PDF/A output.","aliases":[],"kind":"software","website":"https://ocrmypdf.readthedocs.io/","overview":"OCRmyPDF adds searchable text to scanned PDF documents through a command-line workflow. It combines OCR with optional image preparation, optimization and archival-format conversion. It is suited to repeatable processing of existing files rather than acting as a scanner-driver interface or a general visual PDF editor.","license":"MPL-2.0 core; documentation and tests CC-BY-SA-4.0, miscellaneous files MIT with exceptions; dependencies retain their licenses.","lifecycle":"active","example":false,"features":[{"name":"Searchable PDF output","status":"supported","detail":"Adds an OCR text layer; language data and input quality affect recognition.","useCase":"Adding searchable text to existing scanned PDFs in repeatable local workflows","platforms":["Linux","macOS","Windows 64-bit","Windows Subsystem for Linux","FreeBSD"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/","locator":"Purpose and command-line workflow","retrievedAt":"2026-10-07T14:17:13Z","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/cookbook.html","locator":"Languages, sidecar omissions and image-processing cautions","retrievedAt":"2026-10-07T14:17:35Z","kind":"vendor"}]},{"name":"PDF/A generation","status":"limited","detail":"v17 auto output can fall back to ordinary PDF; explicit archival requirements need the appropriate output mode.","useCase":"Adding searchable text to existing scanned PDFs in repeatable local workflows","platforms":["Linux","macOS","Windows 64-bit","Windows Subsystem for Linux","FreeBSD"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/advanced.html","locator":"v17 modes, tagged PDFs and PDF/A fallback behavior","retrievedAt":"2026-10-07T14:19:59Z","kind":"vendor"}]},{"name":"Preserving accessibility structure","status":"limited","detail":"Redo and force processing can discard tags; PDF/A fallback can also affect structure.","useCase":"Adding searchable text to existing scanned PDFs in repeatable local workflows","platforms":["Linux","macOS","Windows 64-bit","Windows Subsystem for Linux","FreeBSD"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/advanced.html","locator":"v17 modes, tagged PDFs and PDF/A fallback behavior","retrievedAt":"2026-10-07T14:19:59Z","kind":"vendor"}]},{"name":"Signed PDF processing","status":"limited","detail":"Refuses signed PDFs by default; overriding the protection invalidates signatures.","useCase":"Adding searchable text to existing scanned PDFs in repeatable local workflows","platforms":["Linux","macOS","Windows 64-bit","Windows Subsystem for Linux","FreeBSD"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/pdfsecurity.html","locator":"Trust boundary, digital signatures and encryption","retrievedAt":"2026-10-07T14:17:28Z","kind":"vendor"}]}],"alternatives":[],"slug":"ocrmypdf","draftAlternatives":[{"targetSlug":"naps2","status":"limited","detail":"Assessment: replaces the OCR-of-existing-PDF portion of NAPS2 with a scriptable processing workflow; it does not replace scanner capture or a graphical page-assembly interface.","useCase":"Adding searchable text to existing scanned PDFs in repeatable local workflows","platforms":["Linux","macOS","Windows 64-bit","Windows Subsystem for Linux","FreeBSD"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/","locator":"Purpose and command-line workflow","retrievedAt":"2026-10-07T14:17:13Z","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/cookbook.html","locator":"Languages, sidecar omissions and image-processing cautions","retrievedAt":"2026-10-07T14:17:35Z","kind":"vendor"},{"url":"https://www.naps2.com/doc/ocr","locator":"OCR of imported PDF pages","retrievedAt":"2026-10-07T14:17:35Z","kind":"vendor"}]}],"evidence":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/","locator":"Purpose and command-line workflow","retrievedAt":"2026-10-07T14:17:13Z","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/cookbook.html","locator":"Languages, sidecar omissions and image-processing cautions","retrievedAt":"2026-10-07T14:17:35Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://ocrmypdf.readthedocs.io/en/latest/","locator":"Purpose and command-line workflow","retrievedAt":"2026-10-07T14:17:13Z","id":"intro","title":"OCRmyPDF documentation","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/cookbook.html","locator":"Languages, sidecar omissions and image-processing cautions","retrievedAt":"2026-10-07T14:17:35Z","id":"cookbook","title":"OCRmyPDF cookbook","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/advanced.html","locator":"v17 modes, tagged PDFs and PDF/A fallback behavior","retrievedAt":"2026-10-07T14:19:59Z","id":"advanced","title":"Advanced features","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/pdfsecurity.html","locator":"Trust boundary, digital signatures and encryption","retrievedAt":"2026-10-07T14:17:28Z","id":"security","title":"PDF security issues","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/installation.html","locator":"Native Windows, platforms and external dependencies","retrievedAt":"2026-10-07T14:19:59Z","id":"install","title":"Installation","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/contributing.html#copyright-and-license","locator":"Core MPL-2.0 and ancillary file licenses","retrievedAt":"2026-10-07T14:17:28Z","id":"license","title":"Copyright and license","kind":"vendor"},{"url":"https://ocrmypdf.readthedocs.io/en/latest/cloud.html","locator":"Resource limits and unsafe public-upload assumptions","retrievedAt":"2026-10-07T14:18:03Z","id":"deployment","title":"Online deployments","kind":"vendor"},{"url":"https://www.naps2.com/doc/ocr","locator":"OCR of imported PDF pages","retrievedAt":"2026-10-07T14:17:35Z","id":"naps","title":"NAPS2 OCR","kind":"vendor"}],"overviewCitations":["intro","cookbook"],"licenseCitations":["license","install"],"sections":[{"id":"recognition","heading":"Recognition workflow","paragraphs":[{"id":"recognition-detail","content":[{"text":"OCRmyPDF takes an existing PDF and adds recognized text so its scanned pages can be searched. The cookbook defaults to English unless languages are specified, and the corresponding language data must be installed. A companion text file contains only text produced by the OCR pass: pre-existing text and skipped pages are omitted. It is therefore not a reliable substitute for extracting every character from a mixed digital-and-scanned document."}],"citations":["intro","cookbook"]}]},{"id":"preparation","heading":"Image preparation","paragraphs":[{"id":"preparation-detail","content":[{"text":"Optional rotation, deskewing and cleanup can improve difficult scans. Cleanup used only for recognition differs from cleanup inserted into the final visible page. The documentation warns that background removal and final cleanup can remove wanted details or introduce artifacts, while some processing rasterizes content. Output needs visual review when these transformations matter, rather than assuming a searchable result preserved all source detail."}],"citations":["cookbook"]}]},{"id":"modes","heading":"Existing text and structure","paragraphs":[{"id":"modes-detail","content":[{"text":"Processing modes can skip pages already containing text, replace an old OCR layer or force rasterization. These choices are not interchangeable: redo and force operations can discard structural tags that no longer match the content. Skip mode preserves structure on untouched text pages, but a subsequent Ghostscript PDF/A conversion can still remove it. Ordinary PDF output is the documented choice when avoiding that conversion is necessary."}],"citations":["advanced"]}]},{"id":"archival","heading":"Archival output","paragraphs":[{"id":"archival-detail","content":[{"text":"In version 17, automatic output is best-effort PDF/A and can fall back to an ordinary PDF. Current documentation describes an internal conversion attempt checked by pikepdf, followed by Ghostscript when necessary. An explicit PDF/A requirement must be selected rather than inferred from successful automatic output. The project's internal check is not presented as a replacement for a reference validator."}],"citations":["advanced"]}]},{"id":"security","heading":"Trust and signed documents","paragraphs":[{"id":"security-detail","content":[{"text":"The security guide says OCRmyPDF is not a malware-protection or PDF-sanitization tool. It normally refuses to modify digitally signed files; overriding that safeguard invalidates the signature even if its visible appearance remains. Encrypted inputs require separate handling, and certificate-encrypted PDFs cannot be opened directly. These constraints make an unchanged original important when OCR output is a derivative rather than the authoritative document."}],"citations":["security"]}]},{"id":"deployment","heading":"Deployment and licensing","paragraphs":[{"id":"deployment-detail","content":[{"text":"Documented installation routes cover Linux, macOS, native 64-bit Windows, WSL and FreeBSD. OCR requires external components such as Tesseract, while rasterization and PDF/A needs determine other dependencies; native Windows has no single all-dependencies installation command. The core uses MPL-2.0, with different terms for ancillary files and dependencies. Server integrations also need CPU and temporary-storage limits and cannot assume that accepting arbitrary uploaded PDFs is safe."}],"citations":["install","license","deployment"]}]},{"id":"substitution","heading":"Substitution scope","paragraphs":[{"id":"substitution-detail","content":[{"text":"OCRmyPDF can replace the existing-PDF OCR portion of "},{"text":"NAPS2","targetSlug":"naps2"},{"text":" in a scripted workflow. Its purpose is adding searchable text, not driving a physical scanner or providing a full interactive editor. The substitution is useful when processing behavior, output format and resource limits can be configured explicitly; it does not establish equivalent document layout editing."}],"citations":["intro","cookbook","naps","deployment"]}]}]},"id":"Q378","revision":364,"updatedAt":"2026-10-11T20:29:34Z","sourceUrl":"https://substitutefor.net/entities/Q378?revision=364"}}