我正在生成一个两列表。当文本太长时,它不会换行到下一个 COLUMN,而是继续到下一页。为什么当文本溢出时它不换行到同一页面上的下一列?
这就是我所说的:
string[] stringList = new string[] {"long string 1", "long string 2"};
Document doc = new Document(PageSize.LETTER);
Paragraph paragraph = new Paragraph();
PdfPTable table = new PdfPTable(2);
table.WidthPercentage = 100;
table.SplitLate = false;
foreach (var item in stringList) {
paragraph.Add(item);
}
PdfPCell cell = new PdfPCell(paragraph);
cell.Colspan = 1;
table.AddCell(cell);
paragraph = new Paragraph();
doc.Add(table);