Add Classic Text Headers & Footers

This code example shows how IronPDF allows developers to define headers and footers for PDF documents loaded from a file system or generated from HTML content.

The TextHeaderFooterclass enables developers to specify the text that should be included in the left, the right, or the central region of a PDF document’s header or footer. As shown above, developers can quickly put together headers and footers using IronPDF’s built-in templating tags (such as {date}, {time}, and {page}). Users do not need to use these tags exclusively; IronPDF gives users the freedom to truly incorporate any kind and amount of text at these locations.

Consider using the HtmlHeaderFooter class in place of the TextHeaderFooter class for far greater design flexibility.