有没有一种快速简单的方法可以使文档对象中的对象居中对齐? 不执行任何计算逻辑,即。获取页面宽度、获取内容宽度、除以二等。
我在 Document 对象中的 Paragraph 对象中有一个 PdfPTable 对象。我想将 Paragraph 对象居中。
谢谢!
最佳答案
iTextSharp 的等效替代品:
paragraph.Alignment = Element.ALIGN_CENTER;
或者这样试试
paragraph.IndentationRight = 100;
paragraph.IndentationLeft = 100;
关于c# - iTextSharp 居中对齐 Document 对象中的对象,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3839548/