iTextSharp error : infinite table loop : row content is larger than page
I'm trying to add content from my database to a table I created with iTextSharp but I get this error:
>infinite table loop : row content is larger than page
Here is my code:
foreach (string n in Data)
{
PdfPCell cella = new PdfPCell(new Phrase(n.id.ToString()));
table.AddCell(cella);
PdfPCell cellb = new PdfPCell(new Paragraph(n.Valeur));
table.AddCell(cellb);
PdfPCell cellc = new PdfPCell(new Phrase(n.Titre));
table.AddCell(cellc);
}
table.SpacingAfter = 40f开发者_如何转开发;
document.Add(table);
Its the n.Valeur
that causing the problem although its content is not that big, mainly a paragraph.
added this settings table and it solved it for me partially
table.SplitLate = false;
table.SplitRows = true;
It's happens when the bug object's (n.Valeur) width or height is more than a page (eg:A4). You must reduce the width or height.
精彩评论