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/