PdfDocumentAddHTMLHeaders Method (HtmlHeaderFooter, Boolean, IEnumerableInt32)

Renders HTML page headers to an existing PDF File

Margin spacing on the PDF page for the header are set to default values of 25mm. An overload method allow header margins to be chosen specifically or set to zero.

Namespace:  IronPdf
Assembly:  IronPdf (in IronPdf.dll) Version: 2020.7.1
public PdfDocument AddHTMLHeaders(
	HtmlHeaderFooter Header,
	bool SkipFirstPage = false,
	IEnumerable<int> PageIndexesToAddHeadersTo = null


Type: IronPdfHtmlHeaderFooter
An new instance of IronPdf.HtmlHeaderFooter that defines the header content and layout.
SkipFirstPage (Optional)
Type: SystemBoolean
if set to true, the first (cover) page is not counted or stamped with a header.
PageIndexesToAddHeadersTo (Optional)
Type: System.Collections.GenericIEnumerableInt32
Optional. The PageIndexes (zero-based page numbers) to which the header will be added.

Return Value

Type: PdfDocument
Returns this PdfDocument object, allowing for a 'fluent' (LINQ like) chained in-line code style
See Also
Download DLL or Install with Nuget