3 Replies Latest reply on Nov 5, 2009 6:25 AM by Patrick Leckey

    Open Multiple Documents on Initialization

    FletchMan16

      I'm using Javascript to open several documents for a PDF form I'm creating in Acrobat Pro.

       

      I'd like to open these 4 additional PDF forms when the user opens the master PDF form so that I can display them when the user clicks a specific check box.  I have tried opening them with the openDoc method in a function that runs when this document is initialized but I get the following error:

       

      Security settings prevent access to this property or method.

       

      What I'm trying to do is get these supplemental forms open in Reader and show them at the appropriate time.  I would also like to prevent the user from closing the forms as they will contain required information if they click a checkbox corresponding to one of the supplemental forms.  I was hoping to get a handle to each of the forms on document initialization so that I can prevent them from closing any of these supplemental forms.

       

      Am I taking the best approach?  If so, how can I accomplish this with Javascript?  If not, what's the best method?

       

      Thanks for your help.

        • 1. Re: Open Multiple Documents on Initialization
          Patrick Leckey Level 3

          As per the documentation, openDoc is a security restricted method.  You need to included in a trusted function in a folder-level JavaScript which can then be accessed by your document.

           

          Also, I'm not sure what you mean by a "handle" to the other forms.  When you use openDoc, assuming the other documents are set to disclose, you will get a Doc object for each of those forms.  However, there is no means through JavaScript to prevent a user from closing a PDF (you can see the obvious security implications here if used by a malicious software developer).  You could issue a notice on closing the PDF that it is required as part of your other forms, but once the user acknowledges that notice the form will still close.

          1 person found this helpful
          • 2. Re: Open Multiple Documents on Initialization
            FletchMan16 Level 1

            Thanks, Patrick, for your response.

             

            I've decided to try a different approach.  I've consolidated all of the forms into one PDF file by inserting the other documents as separate pages into the master PDF file.  This way, I can easily access the information from all of the forms without worrying about the need to disclose.

             

            I'd like to be able to delete the pages that the user hasn't filled out and provide this in Acrobat Reader.  I've used the Javascript deletePages() method but the documentation tells me that I need to enable forms rights for this functionality in Reader.

             

            How do I enable forms rights in my PDF file?

            • 3. Re: Open Multiple Documents on Initialization
              Patrick Leckey Level 3

              The only application that can grant Form rights to a document is Adobe LiveCycle Reader Extensions.

              http://www.adobe.com/products/livecycle/readerextensions/