I'm using Apache freemarker to construct PDF document reports. I have a situation when half of my page is full of text and I need to add a table below it. Table size is dynamic and sometime it fits in the same page with the text and sometimes not, if it does not fit then I get some of the table content on the next page. I want to measure if the table will fit on the same page and if it won't i want to print it on a separate page. Is there any way to achieve that?
In my case it's important to print the table on the same page if it fits.