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.
This is a snap of the trusted function that I created.
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.
Copy link to clipboard
Copied
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);
}