 |
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.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic abstract class PdfSectionElement
Public MustInherit Class PdfSectionElement
The PdfSectionElement type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | Height |
Gets or sets the element height, in points, in the destination pdf page.
|
 | Width |
Gets or sets the element width, in points, in the destination pdf page.
|
 | X |
Gets or sets the element position on the X axis.
|
 | Y |
Gets or sets the element position on the Y axis.
|
Top
Remarks
ExampleHtmlToPdf 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();Dim converter As New HtmlToPdf()
converter.Options.DisplayHeader = True
Dim font As PdfFont = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 12)
Dim element As PdfSectionElement = New PdfTextSection(0, 10, "My header", font)
converter.Header.Add(element)
Dim doc As PdfDocument = converter.ConvertUrl("https://www.google.com")
doc.Save("out.pdf")
doc.Close()
See Also