iTextSharp large table:添加块会在 table 中留下可见的间隙

iTextSharp large table: adding in chunks leaves visible gaps in the table

我有一个很大的 table 我正在添加到文档中。为了避免 运行 内存不足,我这样做:

if (rowCounter % 100 == 0)
{
   document.Add(affidavitsTable);
}

这提高了性能,但是现在,在每 100 行之后,table:

中间有一个空隙

我已经放了一张截图 here - 抱歉还不能 post 图片...:-/

我不太明白评论的意思here但我想知道它是否相关。

如有任何帮助,我们将不胜感激!

谢谢, 埃利泽

我找到了答案。这一行隐藏在我的代码中:

affidavitsTable.SpacingBefore = 8;

:-\