我有一个pdfptable
3 列和一个pdfpcell
(with colspan
3) ,在这里面pdfpcell
我有一个段落,我需要在 PDF 中显示它并justified
对齐。
PdfPTable tbl = new PdfPTable(3);
tbl.WidthPercentage = 100;
string text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
"Maecenas diam nulla, aliquam eget porttitor sit amet, blandit quis nisi." +
"Nulla facilisi. Vestibulum eu eros elit. Nullam laoreet, elit ac tincidunt " +
"convallis, urna dui semper nisi, et imperdiet orci sem quis ante. Aliquam " +
"ut velit vitae massa aliquet malesuada. Quisque a mauris ante. Nam dolor " +
"leo, aliquam congue blandit quis, convallis non mi.";
PdfPCell cellText = new PdfPCell(new Paragraph(text,arial12blackBold));
cellText.colspan = 3;
tbl.AddCell(cellText);
字体是较早创建的,此块之后的文档生成是正常的。我只需要知道如何设置此段落或此单元格以显示对齐的字符串。