HtmlToPdfConvertUrlToMemoryAsync Method

Asynchronously converts a HTML document from a given URL and produces a PDF document in a memory buffer. A new instance of HtmlToPdf must be created for each call to this method

Definition

Namespace: HiQPdf.Next
Assembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.0.0
C#
public Task<byte[]> ConvertUrlToMemoryAsync(
	string url,
	CancellationToken ct = default
)

Parameters

url  String
The URL of the HTML document to convert. The full path of a HTML file in the local file system prefixed by file:// is accepted as an URL
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
The PDF document as a memory buffer

See Also