2 Replies Latest reply on Aug 28, 2015 1:21 AM by Learn2Gro

    Dialog box: Create number of edit_text box counting number of annotes

    Learn2Gro

      HI Forum.

       

      Can you please help to auto create edit_text box counting the number of annotations in the PDF document.

      Instead of creating manually is that possible to auto-create Edit_Text... for example

       

      {name:"wkt1", item_id: "txt50", type: "edit_text",  multiline: true,  width:100, height: 100 },

       

      Thank you.

       



        • 1. Re: Dialog box: Create number of edit_text box counting number of annotes
          George_Johnson MVP & Adobe Community Professional

          I'm not sure what you're asking, can you clarify?


          Note that item_id strings must be exactly four characters, so "txt50" is not valid.

          • 2. Re: Dialog box: Create number of edit_text box counting number of annotes
            Learn2Gro Level 1

            Hi George. thanks for the reply.


            This is a folder action script:

             

            My requirement is to create the "edit_text" field in the dialogue - UI panel. The number of "edit_text" created in dialog panel depends on number of annotations marked in the PDF. For example if the PDF has 2 annotations then 2 "edit_text" field should be created and the annotations contents should be pulled into the edit_text field. Please see below the sample script.

             

            var annots = this.getAnnots();

            var cMyC = "QA_Name\tComment\t\t\t\t====>Job_Number";

            for ( var i=0; i<annots.length; i++ )

            cMyC += ("\n"+annots[i].contents + "\t\"" + "\t\"" + annots[i].page + "\"");

            var mm = cMyC;   

             

            var QA_Tool = {

            annos: mm,

            initialize: function(dialog) {

            dialog.load({"text8":this.annos});

            },

             

            commit: function(dialog) {

            var results2 = dialog.store();

            this.annos = results2["text8"];

            },

             

            description:

            {

            name: "Comments_QA", // Dialog box title

            elements:

            [

            {

            type: "view",

            elements:

            [

            { name: "PLEASE CHECK YOUR QC COMMENTS", item_id:"txt15", type: "static_text"}, 

            {

            type: "view",

            align_children: "align_distribute",

            elements:

                [

            { item_id: "text8", type: "edit_text", multiline: true, width: 500, height: 100 }, // here all the annotations will be pulled inside the single text field, but intention is to create text field for each annotations and pull it inside.

            ]

            },

            ]

            },

            app.execDialog(Comments_QA);

            };

             

             

            Thank you for the support.