我有一张桌子
PdfPTable tblSummary = new PdfPTable(1);
它确实有 2 个嵌套在其中的表。tblSummary
如果它不适合当前页面,我怎样才能使显示为一个整体(行不能中断到另一个页面)或整个表格转移到另一个页面。
我已经尝试SplitLate
过SplitRows
我的代码是这样的
PdfPTable tblSummary = new PdfPTable(1);
PdfPCell csummarycell = new PdfPCell();
PdfPTable tblSummaryFirst = new PdfPTable(3);
.
.
csummarycell.AddElement(tblSummaryFirst);
.
.
tblSummary.AddCell(csummarycell);
tblSummary.SplitLate = true;
tblSummary.SplitRows = false;
像这样,我向 tblSummary 添加了一个表,而结果表的高度总是小于 pagesize 的高度,因此可以确定表的内容不会超过页面高度。
任何建议都会很有帮助。