Add HTML Headers & Footers

Configure the rendering options to include an HTML header and footer when rendering a PDF document with IronPDF, a library by Iron Software that allows for advanced PDF generation and manipulation.

Define the header content with a divider line, an HTML fragment, and specify the maximum height of the header using IronPDF’s flexible PDF rendering tools. Similarly, define the footer content using the htmlHeader property provided by IronPDF.

Note that the height of the header and footer is not automatically detected, which means they might overlap with the main HTML content. Customize the margins to ensure the header and footer are appropriately positioned.

Explore HTML Headers & Footers Code Example on GitHub

Ready to Get Started?
Version: 2026.3 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast?
run a sample watch your HTML become a PDF.