Script to OCR PDFs with the latest FineReader

To follow up, I set up a smart rule, made a copy of your script, and saved it to the folder as directed. I imported a pdf into the designated folder, saw the name change, saw FineReader start up, but then got the error message:

DEVONthink

Finder got an error: Handler can’t handle objects of this class.

I will try to narrow down the part of the script that is causing the error.