Click or drag to resize
Pdf Library for .NET

PdfSectionElement Class

The abstract base class for the elements that can be added to the header or footer of a pdf document.
Inheritance Hierarchy

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public abstract class PdfSectionElement

The PdfSectionElement type exposes the following members.

Constructors
 NameDescription
Protected methodPdfSectionElement 
Top
Properties
 NameDescription
Public propertyHeight Gets or sets the element height, in points, in the destination pdf page.
Public propertyWidth Gets or sets the element width, in points, in the destination pdf page.
Public propertyX Gets or sets the element position on the X axis.
Public propertyY Gets or sets the element position on the Y axis.
Top
Remarks
The concrete section elements are PdfTextSection, PdfImageSection and PdfHtmlSection. Instances are added to a PdfHeader or PdfFooter through its Add(PdfSectionElement) method.
Example
HtmlToPdf converter = new HtmlToPdf();
converter.Options.DisplayHeader = true;
PdfFont font = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 12);
PdfSectionElement element = new PdfTextSection(0, 10, "My header", font);
converter.Header.Add(element);
PdfDocument doc = converter.ConvertUrl("https://www.google.com");
doc.Save("out.pdf");
doc.Close();
See Also