0 Replies Latest reply on Feb 15, 2010 2:22 AM by mazen1977

    How to save and then close document Using Acrobat 9 (URGENT)

    mazen1977

      I have been looking for a soultion for long time now but

      couldn't find any.

       

      I'm using a dynamic PDF form desgined using LC Desginer and created a button that should save the current opened form in the same location (no need to define the location because what I want to use is the command File -> Save) and then close the application (I'm using Acrobat 9 Pro Extended).

       

      I tried many scripts and gone throw JavaScriptfor Acrobat® API Reference but no luck.

       

      Once I click on the button I get the following error: NotAllowedError: Security settings prevent access to this property or method.

       

      Will you please help in this issue as it took long time and my project manager is pushing to get resolved ASAP.

       

      Guys, I'm new to this kind of tecnology so please be patient with me.

       

      Thanks in advance for your valuable help.

       

      The code I used in click event of the button is as follow:

       

      try{

       

           var myDoc = app.newDoc();

           myDoc.saveAs();

           myDoc.closeDoc(true);

      }

       

      catch (e)

      {

           xfa.host.messageBox(""+e);

      }

       

      I used this earlier and got the same error:

       

       

       

      try{

            var myDoc = event.target;

           myDoc.saveAs();

      }

       

      catch (e)

      {

       

           xfa.host.messageBox(""+e);

      }