Hazel does not recognize content

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Re: Hazel does not recognize content Wed Jan 17, 2018 10:07 am • by chirs_collective
Hi there,
I've been having trouble having Hazel recognize my scanned OCR PDF's. I want it to rename the document from certain content in the PDF (example: invoice # 12345) the issue I'm having is it seems to just recognize any number in the document. other perimeters for the rule I need are that the numbers are all different and may not be the same amount of digits. The content is always in the same spot on the document but it doesn't seem to recognize that either. Any help/advice or anyone with an Applescript template (it seems to be above my skill) I can use to do this would be most appreciated.

Thank you!
chirs_collective
 
Posts: 1
Joined: Wed Jan 17, 2018 9:55 am

Re: Hazel does not recognize content Wed Jan 17, 2018 12:07 pm • by Mr_Noodle
Try and match against context, like words/characters that appear before or after. Make use of the preview feature so you can view the text as Hazel does.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Hazel does not recognize content Fri Jun 30, 2023 5:46 am • by roberting
Same problem with some files:
its a pdf invoice, that I can open in a vector editing application (affinity designer) and I could confirm that it contains the date string that i want to match.

However, "contents contain match" will only match the "anything" tag, nothing else, no digits, or individual letters, let alone some more complex constructions.

(I was trying to upload some screenshots but that would not work)
roberting
 
Posts: 5
Joined: Mon Apr 18, 2022 9:40 am

Re: Hazel does not recognize content Fri Jun 30, 2023 8:48 am • by Mr_Noodle
Can you use the preview function as suggested and post the results of that? You can see the text as Hazel does by doing that.
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Hazel does not recognize content Mon Jul 03, 2023 3:24 am • by roberting
Mr_Noodle wrote:Can you use the preview function as suggested and post the results of that? You can see the text as Hazel does by doing that.


Yes, that‘s what i did: using the preview. And any token i tried within the „contains match“ function (apart from the ‚anything‘) would remove the green checkmark.
roberting
 
Posts: 5
Joined: Mon Apr 18, 2022 9:40 am

Re: Hazel does not recognize content Mon Jul 03, 2023 8:36 am • by Mr_Noodle
Can you provide an excerpt of the actual text you are matching against, as seen in Hazel's preview?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Hazel does not recognize content Mon Jul 03, 2023 9:11 am • by roberting
Mr_Noodle wrote:Can you provide an excerpt of the actual text you are matching against, as seen in Hazel's preview?


Hazel does not seem to "see" any content, the little pop-up window shows empty characters (you can scroll down, but there is nothing to see). what I have done is:

I have verified by opening the file with a vector application (Affinity Designer), that it contains text, i.e. a date string or just the word "Rechnung" (german for "invoice"). so there is text and it does not contain hidden special characters either.
However, when I try to mark and extract the text from the file in the "preview" app, the highlighting goes all over the place and only "empty" characters are copied. So, could this be mangled or encrypted in a way, that only a proper design application can extract the text correctly?
roberting
 
Posts: 5
Joined: Mon Apr 18, 2022 9:40 am

Re: Hazel does not recognize content Tue Jul 04, 2023 9:27 am • by Mr_Noodle
Yes, PDF is a nightmare of a format so it's very possible that the document is unreadable to many PDF readers. If you do Print->Save as PDF in Preview, does the resulting file fare any better?
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Hazel does not recognize content Wed Jul 05, 2023 3:54 am • by roberting
If you do Print->Save as PDF in Preview, does the resulting file fare any better?


well the file produced looked better at first glance, as the highlighting fitted to the text in preview, but the characters copied from that would consist of little boxes with question marks in them and hazel would not read it.
(though it does not make sense: it would match, if i did copy these special characters into the match field in hazel. )

So i guess I will have to handle the files of this provider manually.
roberting
 
Posts: 5
Joined: Mon Apr 18, 2022 9:40 am

Previous

Return to Support