Page 1 of 1

[How to] Automatically delete cover pages on downloaded PDFs

PostPosted: Thu Jul 13, 2017 4:23 pm
by cai
After a bit of puzzling around, I made a Hazel rule which will delete cover pages on downloaded PDFs files, with the help of the free PDFtk utility.

The key shell script is:
Code: Select all
path="$1"
name=$(basename "$path" ".pdf")
new_name="$name no cover page.pdf"
dir=$(dirname "$path")
pdftk "$1" cat 2-end output "$dir/$new_name"


Maybe this will help some people on this forum. I've gone into some more detail on how the script works, plus linked a mirrored PDFtk installer, in a blog post: http://cai.zone/2017/07/hazel-rule-to-delete-researchgate-pdf-cover-pages/

Re: [How to] Automatically delete cover pages on downloaded

PostPosted: Fri Jul 14, 2017 10:45 am
by Mr_Noodle
You might want to post this in the Tips forum instead. Or I could move this topic over there for you. Just let me know.

Re: [How to] Automatically delete cover pages on downloaded

PostPosted: Fri Jul 14, 2017 10:46 am
by cai
Mr_Noodle wrote:You might want to post this in the Tips forum instead. Or I could move this topic over there for you. Just let me know.


Oh, sorry, I didn't notice there were multiple forums! :oops: Yes, please do move it, thank you!

Re: [How to] Automatically delete cover pages on downloaded

PostPosted: Fri Jul 14, 2017 10:57 am
by Mr_Noodle
Here it is in its new home. Thanks for the post.