Click or drag to resize

PdfConverterGetPdfBytesFromUrlAsync Method

Converts the specified URL into a PDF document asynchronously and returns the rendered PDF document as an array of bytes.

Namespace: ExpertPdf.Anywhere.HtmlToPdf
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public Task<byte[]> GetPdfBytesFromUrlAsync(
	string url,
	CancellationToken cancellationToken = default
)

Parameters

url  String
The URL of the web page to be converted to PDF. The URL can be also the full path of a HTML file from the local file system.
cancellationToken  CancellationToken  (Optional)
A token that cancels the conversion.

Return Value

TaskByte
A task whose result is the binary representation of the PDF document.
Remarks
No thread waits while the page loads and renders. Cancelling the token stops the conversion and completes the task as canceled. Do not change the converter, or start another conversion with it, before the task completes.
See Also