2 Replies Latest reply on Apr 15, 2008 1:33 AM by (François_Deletter)

    How to set geometricBounds ?

      Hello,

      I am trying to set textFrame's geometricBounds with xml (element or attribute) and apply for each element associated with textFrame by the xml rules, is it possible with Indd CS3 and js ?

      Thanks.

      François
        • 1. Re: How to set geometricBounds ?
          Level 1
          Hi François,

          I don't know if this is what you're after but I call upon textFrame's by using the scrip label but I hope it helps anyway (keep in mind that I am not in the same league as most of the others here).

          The example below adds depth to the textFrames, but it wouldn't be too difficult to change and define the bounds to a specific value.

          var myDoc = app.activeDocument;
          resizeBounds();

          function resizeBounds(){
          for (g = 1; g <= 2; g++){
          var myFrame = myDoc.textFrames.item("TF" + g);
          var myFrameBounds = myFrame.geometricBounds;
          switch(myFrame.label){
          case "TF1":
          myTextFrameSize = myFrame.geometricBounds;
          myTextFrameSize[2]=myTextFrameSize[2]+5;
          myFrame.geometricBounds=myTextFrameSize;
          break;
          case "TF2":
          myTextFrameSize = myFrame.geometricBounds;
          myTextFrameSize[2]=myTextFrameSize[2]+5;
          myFrame.geometricBounds=myTextFrameSize;
          break;
          }
          }
          }
          • 2. Re: How to set geometricBounds ?
            Level 1
            Hi Brett Elliott,

            in first, thanks for your answer.
            I am starting javascript for Indd, I search the best way to set geometricBound with external data of Indd like xml or txt file wich the contain is recognized to affect the values in the variable in my jsx.

            thanks.

            François