在特定页面添加页眉/页脚

IronPDF具有为现有PDF文件添加页眉和页脚的功能。

我们也可以使用Footers添加到旧或新的PDF文档中。 要做到这一点,我们在PDF渲染之后使用以下方法:

  • Add Text Headers Using IronPDF uses IronPdf.PdfDocument.AddHeaders(IronPdf.TextHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>)
  • Add Text Footers Using IronPDF uses IronPdf.PdfDocument.AddFooters(IronPdf.TextHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>)
  • Add HTML Headers Using IronPDF uses IronPdf.PdfDocument.AddHTMLHeaders(IronPdf.HtmlHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>)
  • Add HTML Footers Using IronPDF uses IronPdf.PdfDocument.AddHTMLFooters(IronPdf.HtmlHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>)

探索 IronPDF 页眉页脚操作指南

准备开始了吗?
Nuget 下载 20,296,129 | 版本: 2026.7 刚刚发布
Still Scrolling Icon

还在滚动吗?

想快速获得证据? PM > Install-Package IronPdf
运行示例看着你的HTML代码变成PDF文件。