Script to remove first page from all PDFs in a folder

This sounds like it should be easy, but I've had a hard time finding any program or toolkit that can batch-process a folder full of PDFs, removing the first page from each PDF and re-saving each using the same file name as before.

Perhaps with pdftk, but I can't tell:

Has anyone achieved anything similar?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Adobe Acrobat Pro does this as part of the Document processing options. Create a batch sequence that deletes Page 1 and then select the save as options which also allow for in place saving.

I somehow suspect that you were not looking for Acrobat though...

NRTCFAuthor Commented:
Choosing action 'Delete Pages' and then choosing Page 1 didn't work - I had to click OK for each processed document, and it didn't delete the page anyway.

But I figured it out: I needed to create a batch sequence that executed a Javascript command, which I've attached.

I also set the javascript to non-interactive mode so it wouldn't bug me every time. Now when I run that sequence it actually works.

(Notice I set the page number to 0, not to 1, as apparently Acrobat treats the first page as 'Page 0.')

Thanks for getting me on the right track.

/* Delete First Page */

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.