Page 1 of 1

Contents contain doesn't work on a PDF

PostPosted: Tue Feb 07, 2023 11:22 am
by IvanPsy
Greetings,

for an invoice in PDF format I've set the rule Contents --> Contain, then I've put the string of text, but when I check then the white cross inside the red round icon appears.

The strange thing is if I click on the icon in order to see the contents, then the string of text is there.
I've also tried copy/paste from the contents window, but the bad icon is still there.

I've tried with many strings of text that appear in the contents windows, but I get the same icon.

It's as like as Hazel doesn't detect the text inside the PDF, though it shows it.

How do I solve it?

TNX!

Re: Contents contain doesn't work on a PDF

PostPosted: Tue Feb 07, 2023 1:22 pm
by winzelerm
I am having the same issue. All of my rules with contents contain do not work.

Re: Contents contain doesn't work on a PDF

PostPosted: Wed Feb 08, 2023 10:40 am
by Mr_Noodle
"Contents contain" uses Spotlight so if it doesn't work, it means Spotlight hasn't indexed that file. You can either look into fixing Spotlight on your system or use "Contents contain match" which is more reliable at the expense of some performance.

Re: Contents contain doesn't work on a PDF

PostPosted: Wed Feb 08, 2023 1:27 pm
by winzelerm
So what changed? My rules worked for almost a year and now have stopped.
Also, how does one "fix" Spotlight?

Re: Contents contain doesn't work on a PDF

PostPosted: Thu Feb 09, 2023 10:05 am
by Mr_Noodle
Did you update your OS? That usually causes Spotlight to re-index everything. Search outside this site on how to deal with Spotlight. There are quite a few different situations and the solutions can vary depending on your comfort level.

Re: Contents contain doesn't work on a PDF

PostPosted: Sat Feb 11, 2023 6:24 pm
by winzelerm
When I first started having this issue I had not updated my OS.
I was a few versions behind.
Recently, I did update to the most current OS version. That was a week ago. I am still having this issue.
I've had to convert all of my rules to "contain match" to get them to work.

Re: Contents contain doesn't work on a PDF

PostPosted: Sun Feb 12, 2023 10:06 pm
by jwcoleman
winzelerm wrote:So what changed? My rules worked for almost a year and now have stopped.
Also, how does one "fix" Spotlight?


I've had some initial success by forcing spotlight to reindex.

https://support.apple.com/en-us/HT201716