data-loss. In place mode rewrites your originals; it only modifies a file on success, but back up the archive before a large run.
Who it is forAn office manager digitising years of paper records into a shared drive.
The problemLarge archives take forever one file at a time, and a crash halfway can leave broken files.
The outcomeAn archive where every PDF is searchable, processed in parallel and replaced only on success.
What you need first
- Linux, Windows (or WSL), macOS or FreeBSD, or the Docker image
- Ghostscript and Tesseract OCR installed
- Tesseract language packs for non-English documents
Steps
- Install OC Rmy PDF and the language packs you need
- Update a file in place with
ocrmypdf myfile.pdf myfile.pdf; it only modifies the file on success - Use the --jobs option to control how many cores it uses; it uses multiple cores by default
- Pair it with paperless-ngx, which integrates OC Rmy PDF into a searchable document management system
- Swap the engine with a plugin such as OCRmyPDF-EasyOCR if you have a GPU
Prompt for your agent
Write a script that runs ocrmypdf/OCRmyPDF in place on every PDF under <archive folder>, logs successes and failures to a CSV, and never overwrites a file when OCR fails. Run it on a small test folder first and show me the log.
Caveat. Speed depends on your CPU and page count; the README does not give throughput numbers.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ocrmypdf/OCRmyPDF and "OCR a whole archive in place, safely"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer