Problem with rule to OCR a PDF using PDFPen?

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

It's possible that the script needs to be updated to work with the latest version of PDFPenPro.
Have you considered using the Smart Engines OCR SDK for your PDF OCR needs? They have a lot of experience with OCR and may have a solution that works for you.
If you want to stick with using Hazel and PDFPenPro, I recommend checking out their documentation to see if there are any changes you need to make to your existing script to get it working on your new Mac. It's possible that there are some compatibility issues that need to be resolved. I hope this helps!
Last edited by ManFord on Fri Mar 17, 2023 7:18 am, edited 1 time in total.
ManFord
 
Posts: 1
Joined: Thu Mar 09, 2023 6:40 pm

Re: Problem with rule to OCR a PDF using PDFPen? Fri Mar 10, 2023 11:22 am • by MacOCD
It's possible that the script needs to be updated to work with the latest version of PDFPenPro.


Absolutely it does, however I'm more an end user who manages to get things going via Googling & example scripts. I actually am still using an old version of OSX on that machine purely because I couldn't solve this problem.

There seems to be an issue where there is already an OCR layer in the PDF I think, I'm not sure. All is working perfectly for me still, but I'd dearly love to be able to upgrade my hardware and resolving this is essential to that.

I need the script to OCR the document using PDFPen, irrespective of whether there was a previous OCR layer or not. Like I said all still works fine on my old Mac.

I'd be open to trying an alternative to PDFPen, but in my experience I've had more success triggering other scripts in Hazel based on the document content when OCR'd with PDFPen than I have with Finereader.
MacOCD
 
Posts: 44
Joined: Fri Sep 26, 2014 11:02 am

Are you sure that Hazel isn't seeing the text? Have you checked the text that shows in the rule preview for the specific rules? I have had invoices that looked the same, but the actual content in the text layer that is visible to a PDF reader was changed by the provider. You can preview the entire text of the PDF within the rule window to see exactly what Hazel can see, as explained here:

https://www.noodlesoft.com/manual/hazel ... ew-a-rule/
MasterRee
 
Posts: 19
Joined: Mon Jan 01, 2018 8:21 pm

MasterRee wrote:Are you sure that Hazel isn't seeing the text? Have you checked the text that shows in the rule preview for the specific rules? I have had invoices that looked the same, but the actual content in the text layer that is visible to a PDF reader was changed by the provider. You can preview the entire text of the PDF within the rule window to see exactly what Hazel can see, as explained here:

https://www.noodlesoft.com/manual/hazel ... ew-a-rule/


Yes, it's not all documents, some are detected by my "contains match" criteria, others are not, but after manually running them through PDF Pen they then meet my criteria.

One example would be my phone bill. It sits in my "too be filed" folder and will stay there until I manually OCR it with PDFPen. Then it will rename & file itself as per my rules.

On my older version of Hazel on my v4.4.5 running of OSX 10.12.6 (Sierra) everything works great, the script fails on my Hazel 5.1 on OSX 11.7.4.

I'd love to retire the old machine completely, but currently it's running some Hazel rules.
MacOCD
 
Posts: 44
Joined: Fri Sep 26, 2014 11:02 am

You may need to allow Hazel, Terminal and some other items additional permissions in Security And Pricacy preferences in macOS. Apple has implemented many security changes since 10.12 was released. I recommend that you attempt to run the script manually without the Hazel specific lines I noted you should add to the script earlier in this thread. That may reveal a permissions issues that is not related to Hazel or the content of the script.

Security and Privacy settings to know:
https://support.apple.com/guide/mac-hel ... 1c911f/mac

How to run an AppleScript from Terminal to test:
https://support.apple.com/lt-lt/guide/t ... ml1003/mac

The other issue is that the newer version of PDFPen may not provide the same AppleScript commands, since PDFPEN is now owned by NitroPDF. You can check if the same commands used in the AppleScript are available in the Applesceipt library for your version of PDFPEN as explained here: https://support.apple.com/lt-lt/guide/s ... dt1126/mac
MasterRee
 
Posts: 19
Joined: Mon Jan 01, 2018 8:21 pm

Previous

Return to Open Discussion

cron