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

Adobe Reader DC Java app.beginPrev not a function

New Here ,
May 17, 2017 May 17, 2017

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.

391
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 ,
May 17, 2017 May 17, 2017
LATEST

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

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