Jason Berk | 9 Feb 20:07
Favicon

PdfPTable keepTogether with skipped header rows

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)

Jason Berk | 17 Feb 17:39
Favicon

Re: PdfPTable keepTogether with skipped header rows

Should I open a bug ticket for this, or is it considered a "feature"

Thanks,

Jason

-----Original Message-----
From: Jason Berk [mailto:jberk <at> purduefed.com] 
Sent: Thursday, February 09, 2012 2:08 PM
To: itext-questions <at> lists.sourceforge.net
Subject: [iText-questions] PdfPTable keepTogether with skipped header
rows

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
(Continue reading)


Gmane