HtmlToImageConverterConvertUrlAsync Method

Asynchronously converts an URL to image and returns the rendered image into a memory buffer. A new instance of HtmlToImageConverter must be created for each call to this method

Definition

Namespace: Winnovative.Pdf.Next
Assembly: Winnovative.Pdf.Next (in Winnovative.Pdf.Next.dll) Version: 20.0.0
C#
public Task<byte[]> ConvertUrlAsync(
	string url,
	ImageType format,
	CancellationToken ct = default
)

Parameters

url  String
The URL of the HTML document to convert to image. The full path of a HTML file in the local file system prefixed by file:// is accepted as an URL
format  ImageType
The image format
ct  CancellationToken  (Optional)
A cancellation token that can be used to cancel the asynchronous operation. When cancellation is requested the task returned by this method will complete by throwing OperationCanceledException as soon as possible.

Return Value

TaskByte
A memory buffer containing the the generated image

See Also