Free Support Forum -

Determining the size of a block of text

Is there a method to determine the size (width, height) of a text string as it will be displayed in a table cell? I need to determine how to paginate a Dataset that I am displaying in a Table, and one of my fields is 2000 characters in length. It may not fit on the current page, so I need to know if the height of the new table row will fit on the current page before I add a new row to the table. Given the font size and width of the cell, this seems easy, by I don’t see a built-in method to determine text size.

You will first add a row in the table, then check position of lower corner boundary of table, if it crosses the slide boundary, you will delete the added row from the table and move to next slide and create a new table and then add your row there.

(Table.Y + Table.Height) > Presentation.SlideSize.Height