2 Replies Latest reply on May 12, 2008 4:26 AM by (suresh_devarajan)

    Position and Size of the Text Frame

      Hi friends,

      I am new to indesign scripting using CS2 and VB.net in windows.

      I have added a text frame with the array values arr(4)=10,20,100,100. But when i run this code the textframe will be placed at the position x-60 mm, y-55mm, w-80mm, h-90mm. What is the default units and Measurement.

      How to place a textframe in a particular position say, x-10 mm and y-15mm with a specified size, say w-30mm and h-30mm.

        • 1. Re: Position and Size of the Text Frame
          Level 1
          I think your x-60, y-55 is for CENTER of TextFrame ;)
          so everything is OK ;)

          you should select different reference point in UI:


          below is definition of Geometric Bounds

          Property GeometricBounds As Variant
          Member of InDesign.TextFrame
          The bounds of the TextFrame excluding the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box. as Array of 4 Units (Doubles or Strings)

          look at order of coordinates - [y1, x1, y2, x2] - you need to specify top-left and bottom-right corners - not left-top and width-height


          • 2. Re: Position and Size of the Text Frame
            Level 1
            Hi robin,

            Thanks for the definition of Geometric Bounds.

            I was not aware of the top-left and bottom-right of the bounding box.