Something like "part of PDF content" to file name?

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

Moderator: Mr_Noodle

From one bank I get PDF statements which always have the same file name - without any date info in the file name.

The PDF content of course contains the date (range) of the statement. I somehow would like to extract the date (range) from the PDF content and add it to the file name

Can Hazel do this?
halloleo
 
Posts: 44
Joined: Thu Apr 27, 2017 10:10 pm

Yes, check out "match patterns" in the manual. That should show you how to match text/dates, put it in a custom attribute, and then use that custom attribute elsewhere in your rule.
Mr_Noodle
Site Admin
 
Posts: 11196
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Cool.I will try out "match patterns".

One followup question though: The text to match against comes from a PDF, and from the visual look of the PDF (tabular headings and numbers) it is not immediately clear to me in what order the headers and numbers appear to Hazel. Can I somehow look at the PDF's text extract which Hazel will use for the matching?

Many thanks for your help!
halloleo
 
Posts: 44
Joined: Thu Apr 27, 2017 10:10 pm

Text ordering in PDFs can vary wildly. If you use Hazel's preview function, click on the badge (checkmark or x) for the condition in question and it will show you the value for that condition, which should be the contents as Hazel sees them.
Mr_Noodle
Site Admin
 
Posts: 11196
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

The preview does the job. Thanks.
halloleo
 
Posts: 44
Joined: Thu Apr 27, 2017 10:10 pm


Return to Support