Click or drag to resize

PdfConverterSavePdfFromHtmlStringToFileAsync(String, String, CancellationToken) Method

Converts the specified HTML string into a PDF document asynchronously and saves it to the specified file.

Namespace: ExpertPdf.Anywhere.HtmlToPdf
Assembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntax
public Task SavePdfFromHtmlStringToFileAsync(
	string htmlString,
	string outFile,
	CancellationToken cancellationToken = default
)

Parameters

htmlString  String
The HTML string to be converted to PDF.
outFile  String
The full path of the PDF file to create.
cancellationToken  CancellationToken  (Optional)
A token that cancels the conversion.

Return Value

Task
A task that completes when the PDF file is written.
Remarks
See GetPdfBytesFromUrlAsync(String, CancellationToken) for how the conversion runs and how cancellation works. The file is written only by a conversion that completes before it is canceled.
See Also