Skip to main content
Participant
Sep 30, 2022 7:05 AM UTC
Question

Simple button to SaveAs in javascript

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 is closed to new replies. Start a new post to keep the conversation going.

5 replies

try67
Community Expert
Community Expert
Sep 30, 2022 8:44 AM UTC

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

Translate
Participant
Sep 30, 2022 9:13 AM UTC

OMG... I had missed the capital letter

Sorry and TNX

Translate
Participant
Sep 30, 2022 9:16 AM UTC

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?

Translate