Copy link to clipboard
Copied
I have a PDF form with some fields and a button. The button I want to save a copy of the file so I run run script.
Because it is a saveAs operation I need to have a trusted function to perform the saveAs operation. All good. The form opens, fill in the fields and you click save and the trusted function is called but returns an error saying "TypeError: app.beginPrev is not a function"
The function is:
var Trusted_mySaveDoc= app.trustedFunction(
function(doc,filename){
var myPath="/c/mydocs/"+filename;
app.beginPrev();
doc.saveAs({cPath:myPath,bCopy:true,bPrompttoOverwrite:false});
app.endPriv();
}
);
Called from the PDF script : "Trusted_mySaveDoc(this,saveName);". saveName is a variable for the filename.
As the error says Adobe DC Reader can't find the function so the question is: Where is the function?
Any help appreciated.
Copy link to clipboard
Copied
Ah crap. typo beginPriv() not beginPrev() Must have looked at it a million times.