Skip to main content
New Participant
July 16, 2020
Answered

Trying to create a button to delete pages in a PDF

  • July 16, 2020
  • 1 reply
  • 13330 views

Hi there! I'm not super familiar with interactive PDFs - It's been a while. 😉

 

I'm working on a doc that I would like to have buttons that would delete sections (multiplate pages) of the document. Essentially it's a collection of forms and we don't always need all of them. So I'm looking for a quick way to hit a button to remove them from the collection. 

 

Do I do that through Javascript? If so, how do I do that? Thank you!!! 

This topic has been closed for replies.
Correct answer Amal.

Hi there

 

Please use the script this.deletePages(0,3); from the first link shared esarlier and see if that works for you.
Note you can change the page range in the scrpit as per your requirement.

 

Regards

Amal

1 reply

Amal.
Community Manager
Community Manager
July 16, 2020

Hi Codyc

 

We are sorry for the trouble. As described you want to create a button to delete some pages from the PDF form.

 

Would you mind sharing if you have Adobe Acrobat Reader DC  (Freeware Application) or Adobe Acrobat DC (Subscription)?

You may please refer to the similar discussions below and see if that works for you.

 

1. Solved: button to delete pages - Adobe Support Community - 9084910

2. https://acrobatusers.com/forum/forms-acrobat/using-button-delete-pages/ 
Note: The scripts would not work with Adobe Acrobat Reader DC

 

Hope it will help

 

Regards

Amal

New Participant
July 16, 2020

Hi Amal! 

 

Thanks for the reply! I have the full version of Acrobat and the latest creative cloud subscription. 

 

I've attached a screenshot to show you what I mean - I think this is where I'd put the javascript but I'm not sure what script to copy/paste and how/where I would reference what pages I wanted deleted?

Amal.
Community Manager
Amal.Community ManagerCorrect answer
Community Manager
July 16, 2020

Hi there

 

Please use the script this.deletePages(0,3); from the first link shared esarlier and see if that works for you.
Note you can change the page range in the scrpit as per your requirement.

 

Regards

Amal