Click or drag to resize
Pdf Library for .NET

PdfHtmlSection(Single, Single, String, String) Constructor

Creates a html object that can be added to the header or footer templates of a pdf document.

Namespace: SelectPdf
Assembly: Select.HtmlToPdf (in Select.HtmlToPdf.dll) Version: 26.2
Syntax
public PdfHtmlSection(
	float x,
	float y,
	string htmlString,
	string baseUrl
)

Parameters

x  Single
The position in points on the X axis where the element will be rendered.
y  Single
The position in points on the Y axis where the element will be rendered.
htmlString  String
The html string to be converted to pdf.
baseUrl  String
This parameter allows the converter to resolve relative urls. Basically, baseUrl + relative image/css url = full absolute url.
Remarks
The html element is specified in this case by a html string. The html will be converted and rendered at the (x,y) location in the pdf header or footer. The width of the element in pdf is the available width in pdf page and the height is auto determined.

The web page is rendered in an internal browser with the default width of 1024px and height auto determined. This can be changed using the WebPageWidth and WebPageHeight properties.

See Also