【发布时间】:2020-04-26 12:37:23
【问题描述】:
使用 iTextSharp,您可以通过将事件附加到 PDF 来将页眉/页脚添加到 PDF,如此 SO 答案中所述:https://stackoverflow.com/a/19004392
如何使用 iText 7 做同样的事情?
This link 有 Java 代码示例,但看起来不像它使用页面事件。
【问题讨论】:
-
为什么需要使用页面事件来添加页眉和页脚?您可以在这里找到这些示例的 .NET 版本 github.com/itext/i7ns-samples/tree/develop/itext/itext.samples/…
-
@AndréLemos 你是对的,我不需要使用页面事件。它们看起来比
for循环更优雅。这就是我现在可能必须使用的。谢谢!
标签: c# pdf-generation itext7