I have two tables on my PDF. The first one sometimes spans more than half the page, which forces the second to jump to a new page.
Here are my definitions:
Dim sglTblHdWidths(2) As Single
sglTblHdWidths(0) = 200
sglTblHdWidths(1) = 200
sglTblHdWidths(2) = 102
Dim ToCCSub As New PdfPTable(sglTblHdWidths)
ToCCSub.TotalWidth = 502.0F
ToCCSub.LockedWidth = True
Dim tab As New PdfPTable(1)
tab.TotalWidth = 502.0F
tab.LockedWidth = True
By default, iText won't split a row, but instead forward it to the next page.
You can change this default by changing the value of the
tab.SplitLate = false;
Now the row in the table
tab that was shown on the next page, will be split into two parts, so that the content is distributed over the current page and the next page.