4 Replies Latest reply on Dec 19, 2013 8:58 AM by try67

    Stamp not working in Reader

    JuanMiguel

      Hello,

       

      Please, help me find what I'm doing wrong.

       

      I have done a dynamic stamp that displays a dialog to collect data from several input fields and then fills the stamp's template with the info collected.

      The thing is that the stamp works fine in Acrobat 9 Standard, but when I apply the stamp with Acrobat reader XI the dialog prompts requesting the input fields but the template is not filled. I mean, all "fields" in the picture remain blank.

       

       

      In the Adobe Reader Java Console I get this erro when apliying the stamp.

       

      Exception in line 192 of function top_level, script 0

       

       

      InvalidGetError: Get not possible, invalid or unknown.

      Doc.layout:192:App Promocion:Calculate

       

       

       

      This is the code of the stamp:

      var dlgDatos = {

      vpromocion: "",

      vpartida1: "",

      vpartida2: "",

      vpartida3: "",

      vpartida4: "",

      vpartida5: "",

      vpartida6: "",

      vporciento1: "",

      vporciento2: "",

      vporciento3: "",

      vporciento4: "",

      vporciento5: "",

      vporciento6: "",

      vobservaciones: "",

       

       

      commit:function (dialog)

      { // called when OK pressed

          var results = dialog.store();

       

       

                this.vpromocion = results["prom"];

                this.vpartida1 = results["par1"];

                this.vpartida2 = results["par2"];

                this.vpartida3 = results["par3"];

                this.vpartida4 = results["par4"];

                this.vpartida5 = results["par5"];

                this.vpartida6 = results["par6"];

                this.vporciento1 = results["por1"];

                this.vporciento2 = results["por2"];

                this.vporciento3 = results["por3"];

                this.vporciento4 = results["por4"];

                this.vporciento5 = results["por5"];

                this.vporciento6 = results["por6"];

                this.vobservaciones = results["obse"];

       

       

        },

       

       

        description:

        {

          name: "Stamp Information",  // Dialog box title

          elements:

          [

                {type: "view",

                  elements:

                  [

                {

                  name: "Promoción: ",

                  type: "static_text",

                },

                {

                  item_id: "prom",

                  type: "edit_text",

                  width: 180

                },

                 ]

              },

       

       

            {type: "view",

              elements:

              [

                {type: "view",

                  align_children: "align_row",

                  elements:

                  [

                {

                  name: "Partida ",

                  type: "static_text",

                    width: 120,

                },

                {

                  name: "% ",

                  type: "static_text",

                    width: 120,

                },

                   ]

                  },

       

       

                 {type: "view",

                  align_children: "align_row",

                  elements:[

                {item_id: "par1",

                  type: "edit_text",

                  width: 120},

       

       

                {item_id: "por1",

                  type: "edit_text",

                  width: 120},

       

       

                 ]},

       

       

       

       

                 {type: "view",

                  align_children: "align_row",

                  elements:[

                {item_id: "par2",

                  type: "edit_text",

                  width: 120},

       

       

                {item_id: "por2",

                  type: "edit_text",

                  width: 120},

       

       

                 ]},

       

       

       

       

       

       

                 {type: "view",

                  align_children: "align_row",

                  elements:[

                {item_id: "par3",

                  type: "edit_text",

                  width: 120},

       

       

                {item_id: "por3",

                  type: "edit_text",

                  width: 120},

       

       

                 ]},

       

       

       

       

       

       

                 {type: "view",

                  align_children: "align_row",

                  elements:[

                {item_id: "par4",

                  type: "edit_text",

                  width: 120},

       

       

                {item_id: "por4",

                  type: "edit_text",

                  width: 120},

       

       

                 ]},

       

       

       

       

       

       

                 {type: "view",

                  align_children: "align_row",

                  elements:[

                {item_id: "par5",

                  type: "edit_text",

                  width: 120},

       

       

                {item_id: "por5",

                  type: "edit_text",

                  width: 120},

       

       

                 ]},

       

       

       

       

       

       

                 {type: "view",

                  align_children: "align_row",

                  elements:[

                {item_id: "par6",

                  type: "edit_text",

                  width: 120},

       

       

                {item_id: "por6",

                  type: "edit_text",

                  width: 120},

       

       

                 ]},

       

       

                 {

                  name: "Observaciones: ",

                  type: "static_text",

                },

       

       

                {item_id: "obse",

                  type: "edit_text",

                    multiline:true,

                    height:60,

                  width: 250},

       

       

       

                {type: "ok_cancel",

                  ok_name: "Aceptar",

                  cancel_name: "Cancelar"

                },

              ]

            },

          ]

        }

      };

       

       

      if(event.source.forReal && (event.source.stampName == "#Nn99tcN5Jn2Kqw75dj2kzB"))

      {

        if ("ok" == app.execDialog(dlgDatos))

        {

          var cMsg = dlgDatos.vpromocion;

          event.source.source.info.exhibit = dlgDatos.vpromocion;

          event.value = cMsg

       

       

                this.getField("Partida1").value = dlgDatos.vpartida1;

                this.getField("Porciento1").value = dlgDatos.vporciento1;

       

       

                this.getField("Partida2").value = dlgDatos.vpartida2;

                this.getField("Porciento2").value = dlgDatos.vporciento2;

       

       

                this.getField("Partida3").value = dlgDatos.vpartida3;

                this.getField("Porciento3").value = dlgDatos.vporciento3;

       

       

                this.getField("Partida4").value = dlgDatos.vpartida4;

                this.getField("Porciento4").value = dlgDatos.vporciento4;

       

       

                this.getField("Partida5").value = dlgDatos.vpartida5;

                this.getField("Porciento5").value = dlgDatos.vporciento5;

       

       

                this.getField("Partida6").value = dlgDatos.vpartida6;

                this.getField("Porciento6").value = dlgDatos.vporciento6;

       

       

                this.getField("Observaciones").value = dlgDatos.vobservaciones;

       

       

        }

      }

       

       

      Thank you.