9 Feb 20:07
PdfPTable keepTogether with skipped header rows
Jason Berk <jberk <at> purduefed.com>
2012-02-09 19:07:31 GMT
2012-02-09 19:07:31 GMT
I noticed if I create a table with some header rows and set skipFirstHeader(true) and then set keepTogether(true) and add the table to the document using doc.add(table) the header rows are being considered in the calculation to determine if the table fits on the current page...even if they aren't going to print when the table is rendered. To apply example numbers, assume you have a table with 5 rows all 1 inch tall...keepTogether(true)...skipFirstHeader(true) Row 1 and 2 are header rows Rows 3,4,5 are body rows The table is 5" tall If you have 4" left on the current page, there technically is enough room to print the table, because the headers are skipped and only the three body rows would print. It appears like the two header rows are cause the table to be pushed to the next page because a 5" table can't be rendered in a 4" space with keepTogether(true). Is this by design? Can someone else confirm this? I'm using iText 5.1.2 Jason Berk jberk <at> purduefed.com www.purduefed.com 800.627.3328 x8902(Continue reading)
RSS Feed