Hazel script for OCR with Nitro PDF on macOS 15.2

I just upgraded to iMac M4 and migrated from my previous iMac 2012 running Catalina. Now my Hazel script to OCR using Nitro Pro isn’t working. The document goes into a loop where it continuously OCR’s the document. I have to force quit the application. I also have a MacBook Pro also with MacOS 15.2 also with Hazel 6.0.2 and Nitro PDF 13.3 and it works fine. What OCR software is recommended these days to use with Hazel.

1 Like

Welcome to the community!

The latest Hazel version can do OCR on its own. Unfortunately, the OCR layer will not be saved to the PDF though.

I have not tested it, but I would for sure recommend to just go with freeware/open source.

Ghostscript and OCRmyPDF to the rescue! Just do not hesitate to use homebrew and embrace the Terminal. :slight_smile: After setting it up, it just should work. You do not need a graphical user interface for Hazel.

2 Likes

This is my Hazel rule and script for Nitro Pro. It seems to work. Latest macOS, but Intel Mac.

ADDED: to keep it going in an OCR loop, the rule only runs if the document is not tagged OCRed. After the OCR runs, the document is tagged OCRed. Then it continues to evaluate rules. This rule is one of the last rules and doesn’t run if the document was processed earlier (usually because it has the text layer). The latest Hazel version (which I don’t have) would now process the document without the OCR step. This is a feature that I hope can be disabled!

2 Likes

One more option:

Instead of a tag, I once used a step in Hazel that checked the word count - if there is no OCRed text layer the word count was zero and I sent it to OCR … if word count was above zero I skipped it. Worked fine at that time.

I posted this a years ago if something about Nitro is broken to let you do this for free.

1 Like