Scanning and OCR'ing PDF files
Scanning and OCR’ing PDF Files
Section titled “Scanning and OCR’ing PDF Files”wsl ocrmypdf --deskew --force-ocr -r --rotate-pages-threshold 2.0 "input.pdf" "output.pdf"
On the Windows command line:
`for %f in (*.pdf) do wsl ocrmypdf —deskew —force-ocr -r —rotate-pages-threshold 2.0 “%f” “OCR/%f”
In a Windows batch file:
`for f” “OCR/%%f”
On MacOS:
`brew install ocrmypdf
`find . -name ‘*.pdf’ -printf ‘%p\n’ -exec ocrmypdf —deskew -r —rotate-pages-threshold 2.0 ’{}’ ‘OCR/{}’ ;
`find . -name ‘*.pdf’ | parallel —tag -j 2 ocrmypdf —rotate-pages —rotate-pages-threshold 2.0 ’{}’ ‘OCR2/{}’ ;
`find . -name ‘*.pdf’ | parallel —tag -j 2 ocrmypdf ’{}’ ‘OCR/{}’ ;