|
PdfHtmlElement Constructor (Single, Single, Single, String, String) |
Creates a html object that can be added to a pdf document.
Namespace:
SelectPdf
Assembly:
Select.Pdf (in Select.Pdf.dll) Version: 24.1
Syntax public PdfHtmlElement(
float x,
float y,
float width,
string htmlString,
string baseUrl
)
Public Sub New (
x As Single,
y As Single,
width As Single,
htmlString As String,
baseUrl As String
)
Parameters
- x
- Type: SystemSingle
The position in points on the X axis where the element will be rendered. - y
- Type: SystemSingle
The position in points on the Y axis where the element will be rendered. - width
- Type: SystemSingle
The destination width in points for the rendered content. - htmlString
- Type: SystemString
The html string to be converted to pdf. - baseUrl
- Type: SystemString
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 canvas.
The width of the element in pdf is specified as parameter 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