Skip to main content
peterd042
Participant
May 18, 2017
Question

Adobe Reader DC Java app.beginPrev not a function

  • May 18, 2017
  • 1 reply
  • 441 views

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.

    This topic has been closed for replies.

    1 reply

    peterd042
    peterd042Author
    Participant
    May 18, 2017

    Ah crap.   typo  beginPriv()  not beginPrev()    Must have looked at it a million times.