I created a folder and then created the following Hazel rule to run against it:
- Extension is PDF
- Date Last Modified is after Date Last Matched (to stop it from trying to re-OCR documents)
Then I asked it to run the following Applescript:
tell application "PDFpen"
open theFile as alias
tell document 1
repeat while performing ocr
close with saving
Of course, if you are using PDFpenPro, replace the first line with “PDFpenPro”.
Here’s a screenshot (unfortunately the bottom of the script is cut off):
Hope this helps out you Hazel and PDFPen fans out there. Enjoy.