Click or drag to resize

PdfConverterGetPdfDocumentObjectFromUrlAsync Method

Converts the specified URL asynchronously and returns a Document object that can be modified and saved.

Namespace: ExpertPdf.Anywhere.HtmlToPdf
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public Task<Document> GetPdfDocumentObjectFromUrlAsync(
	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

TaskDocument
A task whose result is the Document object. The Document object must be closed after save to release the system resources used during conversion.
Remarks
See GetPdfBytesFromUrlAsync(String, CancellationToken) for how the conversion runs and how cancellation works. The document of a conversion that completes after the task was canceled is closed.
See Also