gpt4 book ai didi

iTextSharp 错误 : infinite table loop : row content is larger than page

转载 作者:行者123 更新时间:2023-12-01 23:24:59 26 4
gpt4 key购买 nike

我正在尝试将数据库中的内容添加到我使用 iTextSharp 创建的表中
但我收到此错误:

>infinite table loop : row content is larger than page 

这是我的代码:
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);

它的 n.Valeur导致问题的原因虽然它的内容不是那么大,主要是一段。

最佳答案

添加了这个设置表,它为我解决了部分问题

table.SplitLate = false; 
table.SplitRows = true;

关于iTextSharp 错误 : infinite table loop : row content is larger than page,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6599645/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com