3 Replies Latest reply on Nov 23, 2010 8:54 PM by AbhigyanModi

    Adobe Reader X: TrustedFunction SaveAs

    marco.niederberger

      Hello

       

      I installed the new Adobe Reader X, and placed my TrustedFunction in the folder:

      C:\Program Files\Adobe\Reader 10.0\Reader\Javascripts

       

      When i test it, i always get the following error:

      Error in savePdfFile(); NotAllowedError: Secutiry settings prevent access to this property or method.

       

      i tried some settings in Adobe Reader X (like privileged locations) but nothing worked.

       

      TrustedSaveAsPdf.js

      trustedSaveAsPDF = app.trustedFunction(
        function (path){
              var retVal = "";
              app.beginPriv();
              retVal = event.target.saveAs(path);
              app.endPriv();
              return retVal;
        }
      )

       

      My Call:

      try {
         var retVal1 = trustedSaveAsPDF(<FILEPATH>);

      } catch (e) {

         app.alert("Error in savePdfFile(); " + e);

      }