http://api.itextpdf.com/com/itextpdf/text/pdf/PdfWriter.html#getVerticalPosition(boolean)
Read the table chapter. I believe there's a way to tell tables to truncate at the end of the page. You can also add one row at a time and then compare remaining vertical space with the vertical size of the next row. Jason ________________________________ From: William K. Goodbody [mailto:[email protected]] Sent: Monday, May 24, 2010 9:02 AM To: [email protected] Subject: [iText-questions] Calculate Vertical space left on page afteradding text I have a page with some text (in Paragraphs on it). The text on the page is variable in length, sometime one line, sometimes ¾ of the page I am trying to add a table with enough rows to fill up 1 page, but not overflow the page. How can I determine how many rows to add (or vertical space available after adding the text)? How (and where) do I detect when the page is full so I can stop? Thanks, Bill ***This is a transmission from Purdue Employees Federal Credit Union (PEFCU) and is intended solely for its authorized recipient(s), and may contain information that is confidential and or legally privileged. If you are not an addressee, or the employee or agent responsible for delivering it to an addressee, you are hereby notified that any use, dissemination, distribution, publication or copying of the information contained in this email is strictly prohibited. If you have received this transmission in error, please notify us by telephoning (765) 497-3328 or returning the email. You are then instructed to delete the information from your computer. Thank you for your cooperation.***
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
