Skip to main content
rakeshk21205956
Inspiring
Jun 28, 2020 4:17 PM UTC
Question

Use app.execMenuItem("SaveAs"); script to save all pages of the pdf except for the 1st page.

I want to save a pdf file via button using the app.execMenuItem("SaveAs");  but I want to exclude the first page of the file and save the remaining pages.    this .extractPages() doesnot work with Reader.. thatswhy want to use the Menuitem but want to exclude the 1st page.  In other words i want a method which will save the file (except for 1st page) in adobe reader.

 

Below is the script i am using in the button field  for deleting the first page and using menuItem to save it but it is not working in reader.

this.deletePages(0);
app.execMenuItem("SaveAs");

 

Plz guide.

 

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

34 replies

Legend
Jun 28, 2020 5:17 PM UTC

That is not too surprising. You may be going beyond the expected model for Reader (fill a form, submit form data to a web site). Even submitting an entire form may not work.

Translate
Legend
Jun 28, 2020 4:28 PM UTC

Saving will save the whole file, by definition. Adobe really want to sell Acrobat to everyone for this kind of job.

Translate
rakeshk21205956
Inspiring
Jun 28, 2020 4:39 PM UTC

I just checked  app.execMenuItem("SaveAs") is also not working in adobe Reader

Translate
try67
Community Expert
Community Expert
Jun 28, 2020 9:15 PM UTC

That should work, but the deletePages command will not (unless that page was spawned from a Template)...

Translate