I had years of university notes, exam papers, official letters, and lecture handouts sitting on my drive as PDFs, and I’d never given them much thought because they all opened just fine. The problem showed up whenever I tried to search them. Many of those files were basically photographs of pages wearing a PDF costume, so Windows could display every word on the page without knowing any of those words existed.
Uploading dozens of old documents to some random OCR website wasn’t especially appealing, so I looked for a local option instead. OCRmyPDF adds a searchable text layer to scanned PDFs while leaving the pages looking the way they did before. I tested it on Windows 11 with crooked scans, sideways pages, mixed PDFs, and a 72-page batch, and by the end I could finally search an archive that had spent years making me open documents one by one.
Getting started takes longer than using it
Windows needs a few pieces before the easy part begins
OCRmyPDF is a free, open-source command-line tool built around Tesseract OCR, and it runs on Windows, macOS, Linux, WSL, FreeBSD, and Docker. The exact setup depends on the platform. Homebrew users can install it with a single command, while Debian and Ubuntu users can grab it through apt. I tested version 17.13.0 on Windows 11, where the official OCRmyPDF installation guide involves a few more moving parts.
Windows needs 64-bit Tesseract and uv, while Ghostscript is recommended and still required for some PDF/A conversions. I installed Tesseract and uv through Winget, downloaded Ghostscript separately, then installed OCRmyPDF with:
uv tool install ocrmypdf
The only snag was PATH configuration. uv initially placed OCRmyPDF somewhere PowerShell could not find it, and running uv tool update-shell fixed that after I reopened the terminal. If you don’t spend much time in PowerShell, you may want a quick look at these useful Windows PowerShell commands before getting started.
Once everything was installed, the actual OCR command was almost anticlimactically straightforward:
ocrmypdf "old-document.pdf" "old-document-searchable.pdf"
My first test was a two-page scan where Acrobat could clearly display the word “award” several times, yet searching for it returned nothing. OCRmyPDF processed the file, and the exact same search came back with 10 matches. I could also select sentences from the scan and paste them into Notepad because OCRmyPDF had added an invisible text layer beneath the original page image.
The recognition was not flawless. One word came through incorrectly, and some numbering became untidy, so I’d advise you to still verify OCR output before quoting or republishing it. For the far less glamorous job of finding a buried phrase in an old document, though, it was already doing exactly what I needed.
If you’re building a paper archive from scratch, getting a clean scan first will give OCR a better shot. A phone can already handle that job pretty well, as this guide to turning a phone into a document scanner shows.
Old scans need more judgment than one magic command
Deskew helped; automatic rotation taught me some restraint
OCRmyPDF can clean up page geometry too, which came in handy with one old exam paper that had been scanned at a noticeable angle. I ran:
ocrmypdf --deskew "perio-past-question.pdf" "perio-past-question-deskewed.pdf"
The result was visibly straighter, although the file size went up by 27.6 percent. That was a lovely reminder that OCR and image cleanup don’t automatically shrink PDFs. My first test had gone the other way, dropping from 1,356 KB to 1,137 KB, so file size can move in either direction depending on what OCRmyPDF has to do.
Rotation taught me an even better lesson. I had a 53-page PDF with two pages turned sideways, and --rotate-pages identified the orientation correctly but refused to rotate them because its confidence score was too low. OCRmyPDF is deliberately conservative here, and its documentation warns that lowering the threshold will catch more rotated pages while increasing the chance of false positives.
I dropped the threshold to 2.0, and the two sideways pages became upright. Unfortunately, two perfectly good pages were also flipped in the process, which was enough to convince me not to throw aggressive rotation settings at an entire archive and hope for the best.
That makes --deskew and aggressive rotation settings better suited to known problem files than to an unattended sweep across an entire archive. They can be extremely useful, but once preprocessing starts altering page images, OCRmyPDF’s own guidance is worth keeping nearby so you know exactly what each option is allowed to touch.
Making the PDFs searchable also fits nicely into the rest of a Windows file workflow. Everything can find files on Windows almost instantly when the filename or folder is the clue, while OCRmyPDF handles the separate problem of words that are visible on a scanned page but invisible to search.
Batch processing is where OCRmyPDF paid off
The best option knew which pages to leave alone
An old PDF archive is rarely made up entirely of scans. Some files already contain proper text layers, and OCRmyPDF is cautious about that by default. If it finds existing text, it stops instead of blindly stacking another OCR layer on top.
For mixed collections, –mode skip became the option I cared about most. I combined two searchable pages with two image-only pages and ran OCRmyPDF against the resulting four-page PDF. The searchable pages were left alone, the scanned pages were OCRed, and afterward I could search all four.
That was enough encouragement to try a small batch. I put five PDFs totaling 72 pages into one folder and used PowerShell to send processed copies into a separate output directory.
Get-ChildItem -File -Filter *.pdf | ForEach-Object {
ocrmypdf --mode skip $_.FullName (Join-Path "$PWD\output" $_.Name)
}
The whole run took 1 minute 28.9 seconds on my PC, and every PDF in the output folder was searchable when it finished. The originals totaled about 8,566 KB, while the processed set came to roughly 8,235 KB.
Those numbers obviously belong to one PC and one pile of documents, but they gave me a much better sense of what batch OCR looks like in practice. OCRmyPDF also has an official batch-processing guide for larger jobs and watched-folder setups if you want to automate the process further.
You should still keep the originals or make a backup before turning a large archive loose on any automated workflow, especially if deskewing, rotation, or other image processing is involved. I use Duplicati can automate backups of important files, and it fits nicely alongside the other open-source apps that can replace paid software.
The privacy benefit is pretty simple too. OCRmyPDF can do all of this locally, so my old documents never have to pass through an online OCR service just to become searchable. If I later upload the finished PDFs to cloud storage, then the usual questions about encryption, account security, and recovery come back into play, including the security features worth looking for in a cloud storage service.
Ctrl+F was the feature my archive had been missing
The PDFs still look exactly like the faded notes, crooked photocopies, and battered exam papers I saved years ago. The difference is that I can now remember a phrase, search for it, and jump straight to the right page instead of opening files one by one and hoping I get lucky.
For files already sitting on my drive and taking up space, adding a searchable text layer turned them into a much more usable archive.

