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

Making saveAs() work in adobe reader

New Here ,
May 20, 2016 May 20, 2016

Copy link to clipboard

Copied

Hi,

I am trying to save a PDF in XML format through the saveAs() command in Adobe Reader 11.0.

I created a trusted function for saveAs() and used it in my PDF document, it works all fine in Acrobat Pro X but when I try to run it in Adobe Reader 11 it doesn't work.

I did add the .js file for Reader in its proper location.

I even tried by saving the PDF with extended with the "Enable additional features" option in the Acrobat Pro X.

acrobat1.PNG

This is a snap of the trusted function that I created.

Acrobat2.png

This is a snap of the option that I used for saving file.

If this is a wrong method, please let me know what other this I can try. I already tried the running menu items approach.

TOPICS
Acrobat SDK and JavaScript

Views

353

Translate

Translate

Report

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 ,
May 20, 2016 May 20, 2016

Copy link to clipboard

Copied

LATEST

I would assume that the only formats available in Reader via Doc.saveAs() are the same that are available via the user interface (which would be PDF and Text). So it's not surprising that trying to save as XML in Reader will not work. I assume you are getting an error when you try to call the saveAs() function. To verify that, you can wrap it in a try/catch block:

try {

  app.beginPriv();

  oDoc.saveAs(...

  app.endPriv();

}

catch(e) {

  app.alert("Error saving file: " + e);

}

Votes

Translate

Translate

Report

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