Click or drag to resize
Pdf Library for .NET

PdfHeaderAdd Method

Adds an element to the header of the pdf document.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.HtmlToPdf.Universal (in SelectPdf.HtmlToPdf.Universal.dll) Version: 26.4
Syntax
public void Add(
	PdfSectionElement element
)

Parameters

element  PdfSectionElement
The element that will be rendered in the pdf header.
Remarks
There are 3 section elements that can be added to the header of the pdf document: PdfHtmlSection, PdfTextSection and PdfImageSection.
Example
PdfHeader header = new PdfHeader();
PdfFont font = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 12);
header.Add(new PdfTextSection(0, 10, "My header", font));
See Also