Page 1 of 1

Problem with Contents Contain Match finding text

PostPosted: Sat Feb 18, 2023 11:58 am
by Tam-Lin
I'm trying to rename the Make Magazine PDFs I've downloaded from Make; they get downloaded with the filename being a string of numbers, so I created a rule that looks for makezine.com and "Volume <VolumeNumber>", where <VolumeNumber> is a number, and then rename the file to Make Magazine Volume <VolumeNumber>. The problem I'm having is that some of the files I download aren't matching "Volume <VolumeNumber>". If I select the text, and do copy/paste, it does contain Volume 83, say, so I don't understand why Hazel doesn't think it does.

I also used GhostScript to dump the text contents of the pdf to a file, and one that isn't matching via Hazel definitely contains "VOLUME 79", so I'm not sure why Hazel isn't seeing it.

Re: Problem with Contents Contain Match finding text

PostPosted: Tue Feb 21, 2023 10:50 am
by Mr_Noodle
Use Hazel's preview function to see how the text looks to Hazel. Copy and pasting from other programs (except Preview) may not be the same.

Re: Problem with Contents Contain Match finding text

PostPosted: Wed Feb 22, 2023 12:45 pm
by Tam-Lin
It is Preview I was checking with; I was using Ghost Script to double check what I was getting out of preview, to make sure it wasn't some weird text ordering issue or something similar. It seems to be the number specifically that Hazel is having problems with; it can find "Issue No." or "Volume", with "Contents Contains Match" but not "Issue No. <VolumeNumber>" or "Volume <VolumeNumber>", whether I'm looking for a pattern or a specific number.

Oddly, if I search for, say "VOLUME 79", copying the text directly from Preview, Hazel will find that via "Contents Contain", but not via "Contents Contain Match."

Re: Problem with Contents Contain Match finding text

PostPosted: Thu Feb 23, 2023 10:32 am
by Mr_Noodle
How does the text look in Hazel's preview?

Re: Problem with Contents Contain Match finding text

PostPosted: Sun Feb 26, 2023 11:30 pm
by Tam-Lin
It shows up as blank, if I click on the red X. Looking at one of the ones that match, it finds the text in the Contents, it appears.

Re: Problem with Contents Contain Match finding text

PostPosted: Mon Feb 27, 2023 11:14 am
by Mr_Noodle
There's something about how the text layer is being done on those files that Hazel (and other apps using Apple's PDF engine) can't see. Not sure if you have any other PDF apps but it might be worth experimenting with those. Like having them re-save out, hopefully into a more common format.