4 Replies Latest reply on Dec 8, 2013 9:21 PM by IamNathan

    What options do I have for Spawning and Deleting in Reader.

    IamNathan

      Hello All,

       

      This is the issue that I'm having. I have created a form with a few drop down boxes. Based on the selection of the user will determine what forms are displayed via Spawning. This all works great but one of the drop down boxes includes text. The text then needs to be changed based on date/time and location. You can change the text but as soon as you print or save it reverts it back to the original text.

       

      What can I do to fix this. The users will be using Reader so I can't delete the page so I can change the text. If I hide the spawned page it still does the same thing.

       

       

      I Appreciate all help.

       

      Thanks,

       

      Nathan

        • 1. Re: What options do I have for Spawning and Deleting in Reader.
          gkaiseril MVP & Adobe Community Professional

          Are you sure you can spawn a new form page in Reader.

           

          The first version of Reader that could even show or hide a template was verson XI. To have access to all properties and methods of the template object, one nust use Acrobat.

          • 2. Re: What options do I have for Spawning and Deleting in Reader.
            IamNathan Level 1

            Yes I have Acrobat and Reader installed on my Mac and I have also sent it to my work computer (PC) with no issues.

            • 3. Re: What options do I have for Spawning and Deleting in Reader.
              gkaiseril MVP & Adobe Community Professional

              But is that what program is running when you use your scirpt?

               

              Reader 11.005
              object
              1
              Name: UM_Master
              Hidden: false

              NotAllowedError: Security settings prevent access to this property or method.
              Template.hidden:10:Field Button1:Mouse Up

               

              Script:

               

              //
              var t = this.templates;
              console.show();console.clear();
              console.println(typeof t);
              console.println(t.length);
              for(i = 0; i <t.length; i++) {
              console.println("Name: " + t[i].name);
              console.println("Hidden: " + t[i].hidden);
              t[i].hidden = !t[i].hidden;
              }


              • 4. Re: What options do I have for Spawning and Deleting in Reader.
                IamNathan Level 1

                Yes Reader is the default and only program used at work to edit/complete the pdf.

                 

                // Get a template object from an existing template

                var s = getTemplate("oh1page1");

                var t = getTemplate("oh1page2");

                var a = getTemplate("oh1page3");

                var n = getTemplate("oh1page4");

                 

                 

                var numVehicles = +this.getField("VehicleBox").value;

                var numMotorist = +this.getField("Motorist/NonBox").value;

                var numOccupants = +this.getField("OccupantBox").value;

                 

                 

                 

                 

                // Spawn the template on the page following this one, and rename the fields

                s.spawn({nPage: pageNum + 1, bRename: false, bOverlay: false});

                 

                 

                for (var i=0; i<numVehicles; i++)

                t.spawn({nPage: pageNum + 4, bRename: true, bOverlay: false});

                 

                 

                for (var f=0; f<numMotorist; f++)

                a.spawn({nPage: pageNum + 8, bRename: true, bOverlay: false});

                 

                 

                for (var u=0; u<numOccupants; u++)

                n.spawn({nPage: pageNum + 12, bRename: true, bOverlay: false});

                 

                This my code which allows the spawning....

                 

                And this is the code which pulls from one of the drop down boxes:

                 

                event.value = this.getField("AccidentViolation").valueAsString;

                 

                So when it pulls that data it wont allow me to edit that text, and when I do it reverts to the original text.