Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Simple button to SaveAs in javascript

New Here ,
Sep 30, 2022 Sep 30, 2022

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?

TOPICS
Acrobat SDK and JavaScript , Windows
376
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2022 Sep 30, 2022

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2022 Sep 30, 2022

OMG... I had missed the capital letter

Sorry and TNX

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 30, 2022 Sep 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2022 Sep 30, 2022

No.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 30, 2022 Sep 30, 2022
LATEST

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.

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines