Page 1 of 1

Hazel reading only first page of pdf?

PostPosted: Fri Dec 10, 2021 7:18 am
by per.becker
Hi,
I am new to Hazel but have already found a range of uses that really help my workflow. For instance, I am an academic and want to automate import of references that I download online or from emails (or from wherever) to Bookends. I have already managed to get Hazel to check if downloaded files in Downloads are pdfs and if their contents include a DOI-number (which almost all scientific papers do). Hazel then show the file in Finder so I can check and assign a tag, before Hazel move the tagged file to a watched import folder of Bookends, which does the rest. VoilĂ !

However, to make Hazel even more accurate I would like to only check for a DOI-number on the first page (which almost all scientific papers have), and not the entire document. Is there a way to limit the contents check to the first page?

Thanks on beforehand!
Per

Re: Hazel reading only first page of pdf?

PostPosted: Fri Dec 10, 2021 9:41 am
by Mr_Noodle
There's nothing like that now. Maybe there are some commandline programs that might selectively extract text by page which you can tie into a script but I don't know of any off hand.

Re: Hazel reading only first page of pdf?

PostPosted: Fri Dec 10, 2021 9:52 am
by per.becker
Thanks for the quick reply! I will have a look around. It works like it is, but it could be even better with such functionality. I also realise that learning to use scripts would really expand the utility of Hazel.

Thanks again!