« Formatting short dates in AppleScript | Main | WhatsObservable v0.1.0 uploaded to PyPI »
Friday
Dec062013

OCR all PDF files in a directory using PDFpenPro 6

I wanted to OCR all PDF files in a directory in a scripted way. PDFpenPro 6 has a nice OCR engine built-in. I just needed a way to automatically apply it to a bunch of files.

A little bit of fumbling with AppleScript and voila, two scripts to do exactly this. The first acts on all the PDF's within a directory without recursively descending into directories, the second adds recursion.

In my case I'm cleaning up a bunch of old folders of scanned papers, so this is basically a one-time use case. Another very nice idea is to have a folder action that automatically does OCR on any PDF dropped into a specific folder, but I didn't need the extra complexity of a folder action.