Simple button to SaveAs in javascript
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Use "SaveAs" as the parameter, not "saveAs".
Copy link to clipboard
Copied
OMG... I had missed the capital letter
Sorry and TNX
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
No.
Copy link to clipboard
Copied
Browsers are not true PDF viewers. Or to put it another way, the PDF viewers created by the people who make web browsers suck. I would not expect a web brower to handle any interactive PDF featurs.
Use the Acrobat JavaScript Reference early and often

