itext将段落保持在一起
|
我有2个段落对象,约占页面的2/3。当我在pdf中查看时,第二段的开头从第二页开始。有没有办法在第一段之后的第一页上启动它?
PdfPTable rs1 = new PdfPTable(1);
PdfPCell c = new PdfPCell();
c.MinimumHeight = 36f;
Paragraph p = new Paragraph(
\"some text to align\\n\" +
\"...\" +
\"some text to align\\n\"
);
c.AddElement(p);
rs1.AddCell(c);
PdfPCell c2 = new PdfPCell();
c.MinimumHeight = 36f;
Paragraph p2 = new Paragraph(
\"some text to align\\n\" +
\"...\" +
\"some text to align\\n\" +
\"some text to align\\n\"
);
p2.KeepTogether = false;
c2.AddElement(p2);
c2.VerticalAlignment = Element.ALIGN_TOP;
rs1.AddCell(c2);
return rs1;
没有找到相关结果
已邀请:
2 个回复
提孺局缎
净爽
),并可能要调整已设置的任何填充物。