 |
HtmlToImageConvertHtmlString(String, String) Method |
Converts the specified HTML string to an image in
ImageFormat (PNG by default), resolving relative urls against the base url.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.5
Syntaxpublic byte[] ConvertHtmlString(
string htmlString,
string baseUrl
)
Public Function ConvertHtmlString (
htmlString As String,
baseUrl As String
) As Byte()
Parameters
- htmlString String
- The HTML markup to render.
- baseUrl String
- The base url used to resolve relative resource references (images, CSS) in the markup. An http or https base url is also the page's own address and origin.
Return Value
ByteThe rendered image, encoded in
ImageFormat.
Exceptions| Exception | Condition |
|---|
| HtmlToPdfException | Thrown when htmlString is null, or the conversion fails. |
See Also