在特定页面添加页眉/页脚 IronPDF具有为现有PDF文件添加页眉和页脚的功能。 我们也可以使用IronPDF的方法为旧的或新的PDF文档添加自定义的页眉和页脚。 要做到这一点,我们在PDF渲染之后使用以下方法: 使用IronPDF添加文本标题使用 IronPdf.PdfDocument.AddHeaders(IronPdf.TextHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>) 使用IronPDF添加文本页脚IronPdf.PdfDocument.AddFooters(IronPdf.TextHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>) 使用IronPDF添加 HTML 标头使用 IronPdf.PdfDocument.AddHTMLHeaders(IronPdf.HtmlHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>) 使用IronPDF添加 HTML 页脚IronPdf.PdfDocument.AddHTMLFooters(IronPdf.HtmlHeaderFooter, System.Boolean, System.Collections.Generic.IEnumerable<System.Int32>) 探索 IronPdf 页眉页脚操作指南 在 GitHub 上查看 代码 https://github.com/irondarrius/IronPDF.Examples/tree/main/examples/adding-headers-and-footers-advanced 下载 ZIP 相关教程 相关操作指南 类文档 获取语言包 下载IronPDF DLL 报告此页面的问题 准备开始了吗? Nuget 下载 17,803,474 | 版本: 2026.3 刚刚发布 免费试用 免费 NuGet 下载 总下载量:17,803,474 查看许可证 还在滚动吗? 想快速获得证据? PM > Install-Package IronPdf 运行示例看着你的HTML代码变成PDF文件。 免费 NuGet 下载 总下载量:17,803,474 查看许可证