Skip to main content
Participant
September 30, 2022
Question

Simple button to SaveAs in javascript

  • September 30, 2022
  • 1 reply
  • 454 views

hi all, I'm making buttons in some PDF documents using javascript. They all work except the most trivial thing, I can't make a button that does the SaveAs.
The javascript is trivially this:
app.execMenuItem ("saveAs");
When the mouse is released it does absolutely nothing, looking around does not seem to me that the syntax has changed, can you help me?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
September 30, 2022

Use "SaveAs" as the parameter, not "saveAs".

Participant
September 30, 2022

OMG... I had missed the capital letter

Sorry and TNX

Participant
September 30, 2022

It works well if it is opened in adobe reader, if it is opened with a browser (chrome / edge) it does not work, I guess precisely because it calls a specific action of the program.
Do you think there is a way to make it work even if opened via a browser?