Search code examples
itexttabular

iTextSharp table cell content only display complete content in second page directly due to long content


I had search some relative question which had been asked, but seem not too much my condition.

My problem is simpler to this problem Table in iTextSharp is not page breaking as desired?

The different between my problem and his is I need header in each extend page.


Currently I put a long table in one of cell, it make me has header in each page, but if the table to long, all table will shift to second page, and first page is empty.

I have tried table.KeepRowsTogether, but the 15 rows stay in second page and rest in third..


Solution

  • I determine what is the length of list. if number of items more than 15 then I separate list into 0 ~ 14 and 15th to the end, keep all content in the same table then there will having header in second page. Case close