Click or drag to resize
Pdf Library for .NET

HtmlToImageConvertUrl Method

Converts the web page at the specified url to an image in ImageFormat (PNG by default).

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public byte[] ConvertUrl(
	string url
)

Parameters

url  String
The absolute url of the web page to render.

Return Value

Byte
The rendered image, encoded in ImageFormat.
Exceptions
ExceptionCondition
HtmlToPdfExceptionThrown when url is null or empty, or the conversion fails.
Example
SelectPdf.Universal.HtmlToImage converter = new SelectPdf.Universal.HtmlToImage();
byte[] png = converter.ConvertUrl("https://www.google.com");
See Also