5 Replies Latest reply on May 11, 2010 2:27 PM by Michael_Eisenman

    Javascript stopped functioning when reader 9.2  installed

    Michael_Eisenman

      I have a fillable PDF form that was designed using Live Cycle Designer -

      It uses a javascript to load XML data and fill the PDF form fields.

       

      This had been working previously in a previous version of Reader but has suddenly stopeed working now that Reader 9.2 was installed -

      has there been some sort of a change in how javascripts function for the Reader since 9.2 . ?

       

      The Load function javascript is tested and currently works inside Acrobat Professional - but does nothing in Reader.

       

      Please help

       

      Thanks

        • 1. Re: Javascript stopped functioning when reader 9.2  installed
          Michael_Eisenman Level 1

          I enabled the javascript Debugger console and I received this message :

           

          access to this property or method.
          Doc.importXFAData:-1:XFA:CATALOG[0]:Page1[0]:Button1[0]:click

          NotAllowedError: Security settings prevent access to this property or method.
          Doc.importXFAData:-1:XFA:CATALOG[0]:Page1[0]:Button1[0]:click

           

          This had worked previously - Is there a setting that I am not seeing which will allow the reader to p[erform this very useful function ?

          • 2. Re: Javascript stopped functioning when reader 9.2  installed
            gkaiseril MVP & Adobe Community Professional

            Adobe upped the security level to access the import XFDF or XML data with the introduction of version 7. You need to use an application folder level JavaScript that creates a 'trusted function' to perform this action. See the Acrobat JS API Reference for more information.

            1 person found this helpful
            • 3. Re: Javascript stopped functioning when reader 9.2  installed
              Michael_Eisenman Level 1

              Below is the javascript that I am using -

              It is currently declared to be a trusted function -

              It works perfectly fine in Acrobat 9.0 professional -

              I thought that this would also work in the reader.

               

               

              importMHCXFAData = app.trustedFunction( function (Form,cFile)
              {
              app.beginPriv();
              this.importXFAData(cFile);
              app.endPriv();
              }
              );

              • 4. Re: Javascript stopped functioning when reader 9.2  installed
                Bernd Alheit Adobe Community Professional & MVP

                For the use of the method importXFAData in Adobe Reader the document must have form rights enabled. Read the documentation.

                1 person found this helpful
                • 5. Re: Javascript stopped functioning when reader 9.2  installed
                  Michael_Eisenman Level 1

                  So then, a RIKLA is the only way to have this useful functionality available for the reader ?

                   

                  to me, it is clearly worth it - we have reader running everywhere - but corporate doens't like the $1,000 RIKLA price tag and the lack of a guarantee from Adobe that it will work in future relases , etc.

                   

                  no crafty work - arounds ? huh ?

                   

                  The current work-around is to write an Adobe Acrobat plug-in that allows a centralizd function to process XML files and fill out PDF's on demand from the XML files generated from a number of other smaller, processes.

                  This means that an operator needs to, periodically, run the PDF filling plug-in function at a particualr workstation which has a running copy of Adobe Acrobat and then they filled PDF files are then visible - .

                   

                  The only other available solution is to generate a PDF from scratch - and that is an un-popular proposal - sice we would then need to maintain many different forms manually -

                   

                  Personally, i think Adobe is missing the bigger picture here -

                  I think if they made this capability avaialbe they would sell more copies of Acrobat / live cycle because at mnay more people would want to automate this very tedious processing.

                   

                  Anyway - my two cents are up ....

                   

                  Thanks for the help