 |
HtmlToImageConvertUrl Method |
Converts the web page at the specified url to an image in
ImageFormat (PNG by default).
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic byte[] ConvertUrl(
string url
)
Public Function ConvertUrl (
url As String
) As Byte()
Parameters
- url String
- The absolute url of the web page to render.
Return Value
ByteThe rendered image, encoded in
ImageFormat.
Exceptions| Exception | Condition |
|---|
| HtmlToPdfException | Thrown when url is null or empty, or the conversion fails. |
ExampleSelectPdf.Universal.HtmlToImage converter = new SelectPdf.Universal.HtmlToImage();
byte[] png = converter.ConvertUrl("https://www.google.com");Dim converter As New SelectPdf.Universal.HtmlToImage()
Dim png As Byte() = converter.ConvertUrl("https://www.google.com")
See Also