Match the correct one of multiple dates in PDF

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

Moderator: Mr_Noodle

Match the correct one of multiple dates in PDF Sun Apr 12, 2020 11:07 am • by JuSchu
Hello!

I am trying to extract the correct date from a PDF file. But there are several dates in it. Since the files are often read by OCR, Hazel does not "read" the files from top to bottom and with the function "match the x occurence..." I often cannot find the correct date.
I would like to filter the correct date with the rule "Date last matched" "is in the last x week".
unfortunately I am not successful with this. Can this rule even filter OCR-read dates?

Thanks for your help!
JuSchu
 
Posts: 3
Joined: Sun Apr 12, 2020 10:01 am

Note that Hazel does not control the order of the text and because of the nature of PDF, there's no guarantee the text appears in any order that is sensible.

Check the preview and see if there's surrounding text you can use in your pattern. If not, see if the date is consistent in terms of the number of the occurrence (e.g. it's always the 3rd date).
Mr_Noodle
Site Admin
 
Posts: 11255
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I found a solution that suits me better:

Image

Image

Image

This aims at just received documents e.g. scanned mail, recent invoices etc.
It does not help a lot for importing and renaming old documents.
JuSchu
 
Posts: 3
Joined: Sun Apr 12, 2020 10:01 am


Return to Support

cron