PDF and billing date

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

Moderator: Mr_Noodle

PDF and billing date Sat Nov 19, 2022 11:31 am • by Anthony H
Hi and I know I've been here before (couldn't find my account, so... a new Username and such),

But here's the crux of the issue:

* Hazel can match all that I ask of it; but the billing date, when the PDF is rendered through OCR, changes in the instance found (not in actual location on the PDF page). So, any idea how I can correct this, sometimes it's the 6th instance, but often, it's the 4th or some other.

Here's how I have my rule written:

If all of the following conditions are met
* Kind is PDF
* Name contains account number (for example 123456)
* Contents contain vendor name (for example Netflix)
* Contents match MMM DD, YYYY: Match the 6th occurrence from the beginning

It is this last line therein the Contents contain match that the issue is. I can manually work through the matches, but to get it to repeatedly, across a years worth of bills, to match the correct instance, works maybe 1/6 of the time at best. Often it is a manual intervention needed.

I have read and reread both the Hazel documentation related to this as well as the forums on similar situations and haven't (over many years) been able to figure this one out. I even have had a new situation (in Hazel 5.2) where the date match is grabbing a new date 20230316, that does not in anyway appear in the attached PDF. So I am stumped. Also this is the only bill I have that exhibits this shifting of the date matching issue, all my other ones are fine and this rule was originally either the child of working rules or the basis of newer working rules for other bills that don't have this issue.

Thank you for reading and any offered help, in advance. Hazel, along with 1Password and Notejoy, are my first 3 non-Apple app installs and have been (well 1Password and Hazel) for over 10 years on new Mac setup/refreshes.

Cheers,

Anthony
Anthony H
 
Posts: 3
Joined: Sat Nov 19, 2022 10:51 am

Re: PDF and billing date Mon Nov 21, 2022 10:47 am • by Mr_Noodle
Use Hazel's preview function and click on the red X or green checkmark (whichever one applies to that "contains match" condition) to see what the text looks like to Hazel. Also, it's much better if you can match using surrounding text instead of the nth-occurrence.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: PDF and billing date Mon Nov 21, 2022 1:00 pm • by Anthony H
Hi Mr_Noodle,

Thank you, I have done the first part (the previewing); a to the additional surrounding text, I didn't think of that and will try to work something out.

Cheers,

Anthony
Anthony H
 
Posts: 3
Joined: Sat Nov 19, 2022 10:51 am

Re: PDF and billing date Tue Nov 22, 2022 11:57 pm • by Anthony H
Hi Mr_Noodle,

Thank you again, it took some trial and error, but with the pattern matching and then, custom date modification based on that obtained date from the pattern, I have a working rule that seems, having tested on various prior versions of the bill, to work.

Cheers,

Anthony
Anthony H
 
Posts: 3
Joined: Sat Nov 19, 2022 10:51 am


Return to Support

cron