Contents contain doesn't work on a PDF

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

Moderator: Mr_Noodle

Contents contain doesn't work on a PDF 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!
IvanPsy
 
Posts: 26
Joined: Thu Jul 14, 2022 3:38 am

Re: Contents contain doesn't work on a PDF 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.
winzelerm
 
Posts: 5
Joined: Tue Jan 24, 2023 6:36 pm

Re: Contents contain doesn't work on a PDF 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.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Contents contain doesn't work on a PDF 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?
winzelerm
 
Posts: 5
Joined: Tue Jan 24, 2023 6:36 pm

Re: Contents contain doesn't work on a PDF 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.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Contents contain doesn't work on a PDF 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.
winzelerm
 
Posts: 5
Joined: Tue Jan 24, 2023 6:36 pm

Re: Contents contain doesn't work on a PDF 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
jwcoleman
 
Posts: 1
Joined: Sun Feb 12, 2023 10:00 pm


Return to Support

cron