Add Headers/Footers on Specific Pages
IronPDF has the ability to add headers and footers to existing PDF files.
We can also use methods of IronPDF to add customized Headers and Footers to old or new PDF documents. To do so, we wait until after the PDF is rendered using the following methods:
- 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>)
View on GitHub
Code
https://github.com/irondarrius/IronPdf.Examples/tree/main/examples/adding-headers-and-footers-advanced
Ready to Get Started?
Nuget Downloads 16,901,161 | Version: 2025.12 just released





