Skip to main content
rakeshk21205956
Inspiring
June 28, 2020
Question

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

  • June 28, 2020
  • 2 replies
  • 6318 views

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 has been closed for replies.

2 replies

Legend
June 28, 2020

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.

Legend
June 28, 2020

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

rakeshk21205956
Inspiring
June 28, 2020

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

try67
Community Expert
Community Expert
June 28, 2020

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