1 Reply Latest reply on Jul 7, 2014 9:08 AM by Dave Saunders

    Adjust a table to a textframe

    aiyaly

      Hello,

       

      I am trying to write a script to adjust any table to a textframe.

      Capture.JPG

      My problem is when i apply the script, the row3 that contains two lines is cut, and we can only see the first line even though there is enough space between the table and the textframe.

      All the cells are unifomized.

       

      Thank you for your help.

       

      Kind regards,

        • 1. Re: Adjust a table to a textframe
          Dave Saunders Level 4

          What does "adjust to a text frame mean" Your picture suggests you want to adjust the height to match that of the text frame -- is that correct?

           

          To do that, you need to adjust each row; if you simply change the height of the table itself, the rows will indeed be adjusted to be of equal height. So, to achieve your goal, you need to calculate the position of the current bottom of the table, subtract that from the height of the frame and then divide by the number of rows to get an increment for each row.

           

          Dave