Adobe’s extraction guide notes that many PDF and OCR tools support batch processing so you do not have to run recognition on each file individually, and warns to spot-check important information after processing. OCRmyPDF’s manual adds that –jobs limits how much parallel work it performs.
Use the practice file
A practice file, practice-folder. The file is fictional.
| File | Content |
|---|---|
| scan-01.pdf | Invoice, 2 pages |
| scan-02.pdf | Report, 6 pages, word “harvest” on page 3 |
| scan-03.pdf | Letter, 1 page |
The three files are the check items: all three must come out searchable.
Batch OCR the folder
Expected result. We checked the OCRmyPDF manual and the Tesseract manual. We did not run any tool. The checks below are what to expect if the work is done correctly; run them yourself on the practice file.
1. List the folder
List the folder’s PDFs and note their page counts.
Expected result: Three files are listed: 2, 6 and 1 pages.
2. Run OCRmyPDF on each file
Run ocrmypdf on each file in turn, writing the outputs to a second folder.
Expected result: Three searchable PDFs are created in the output folder.
3. Spot-check the report
Open the output scan-02.pdf and search for “harvest”.
Expected result: 1 hit, on page 3.
4. Check the counts
Compare the output page counts with the inputs.
Expected result: The outputs hold 2, 6 and 1 pages, matching the inputs.
Verdict table
| Check | Expected result | Pass? |
|---|---|---|
| List the folder | Three files are listed: 2, 6 and 1 pages. | — |
| Run OCRmyPDF on each file | Three searchable PDFs are created in the output folder. | — |
| Spot-check the report | 1 hit, on page 3. | — |
| Check the counts | The outputs hold 2, 6 and 1 pages, matching the inputs. | — |
Related guides: How to Batch OCR a Multi-Page PDF with Consistent Settings — How to Add a Searchable Text Layer to a Scanned PDF.
Limits
- A batch that processes every file can still fail one file silently; check the output count against the input count before filing anything away.
- Command-line OCR rewrites the file, so always work on a copy and keep the original scan untouched.
- UNTESTED — no OCR tool was run; all results above are expected results. The practice file is fictional.
Sources
- OCRmyPDF manual, “ocrmypdf(1) — add an OCR text layer to scanned PDF files” — Modes default, force, skip, redo and strip; –sidecar writes the recognized text; –pages limits OCR to chosen pages. Checked 2026-11-28.
- Tesseract manual, “tesseract(1) — command-line OCR engine” — Default language is English; -l takes 3-character ISO 639-2 codes, joined with + for several languages; –list-langs lists installed packs; –psm sets the page segmentation mode. Checked 2026-11-28.
