5 Replies Latest reply on Oct 16, 2012 12:25 AM by Laubender

    Textbox properties

    bala281972 Level 1

      Hi Guys

       

      i'm working on a script which will add check box / combo box / text box etc at a predefined places and export it as a interactive pdf. Now i'm wondering what could be the code which will change the style of the check box / combo box / text box to 'inset', 'underlined', 'bevel' etc. Could not get any help from the data browser or from the Object Model Viewer in extended tool kit. Any help on this ?

       

      Attached the screen shot of the same for your ready reference as well as the code too

       

      var myLibrary = app.open("/Applications/Adobe\ InDesign\ CS6/Presets/Button\ Library/ButtonLibrary.indl") /*opening the sample button library, where i've added my own check box/combo box/text box*/

      myNames = myLibrary.assets.everyItem().name;

      var myObj = app.libraries[0].assets[0].placeAsset(app.documents[0])[0]; /*assets[0] will fetch the last item from the library, assets[1] will fetch last but one from the library and so on */

      myObj.fontSize = 4;

      myObj.fillColor=app.activeDocument.swatches.item("Paper");

      myObj.strokeColor=app.activeDocument.swatches.item("Paper");

       

      none of the below mentioned codes work

      //   myObj.strokeType.properties.name="Inset"

      //   myObj.strokeType.strokeStyleType.name="Inset"

      //   myObj.strokeType.name="Inset"

      //   myObj.strokeType="Inset"

       

       

       

       

      Screen Shot 2012-10-15 at 9.48.32 AM.pngScreen Shot 2012-10-15 at 9.54.34 AM.png

       

       

      Btw, the screen captures shown above are from adobe acrobat and not from indesign

       

      Rgs

      Bala

        • 1. Re: Textbox properties
          Green4ever Level 3

          Did you tried like this

          myObj.strokeWeight = "2pt";

          I have tested it with a rectangular frame, it worked for me.

           

          ---------

          Green4ever

          • 2. Re: Textbox properties
            bala281972 Level 1

            Hi

             

            Thanks for your effort. Yes. I tried that too. if the line thickness is 2pt, the line thickness dialog box will change to 'medium' and if pt size is 3 then the property of line thickness will change to 'thick' but the line style remains 'solid' and i would like to change to 'bevel' or 'inset' depends on the condition.

             

            Screen Shot 2012-10-15 at 11.41.57 AM.png

            • 3. Re: Textbox properties
              Green4ever Level 3

              Can you just me the example of what you want in indesign (not in PDF). I am not clear what you mean. May be I understand wrongly.

               

              obj1.strokeWeight = "2pt";

              obj1..strokeType = app.activeDocument.strokeStyles.item("Dotted");

              obj2.strokeWeight = "2pt";

              obj2.strokeType = app.activeDocument.strokeStyles.item("Solid");

              Try the above line to apply a stroke style to a frame object.

               

              ------------

              Green4ever

              • 4. Re: Textbox properties
                bala281972 Level 1

                Hi

                 

                Thanks. Unfortunately this is not what i require. What i require is, i would like my forms to use the effect 'inset', 'bevelled' in acrobat. Since the PDF been created using indesign, i would like to know how to do this using indesign. For example the below attached form layout has a bevelled rectangular box due to the property 'inset'. I would like to know how to set value for 'line style column' the default value is 'solid'

                 

                Screen Shot 2012-10-15 at 3.15.38 PM.png

                • 5. Re: Textbox properties
                  Laubender Adobe Community Professional & MVP

                  @bala281972 – I fear you have to script Acrobat to get the effects you want…

                   

                  Uwe