HtmlToPdfConvertHtmlToFileAsync Method
Asynchronously converts a HTML code to a PDF file.
A new instance of HtmlToPdf must be created for each call to this method
Namespace: HiQPdf.NextAssembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.0.0
public Task ConvertHtmlToFileAsync(
string htmlString,
string baseUrl,
string outFile,
CancellationToken ct = default
)
- htmlString String
- The HTML code to convert
- baseUrl String
- The base URL that can be used to resolve the relative URLs found in the HTML code.
It can be null if there are not relative URLs in the HTML code
- outFile String
- The output PDF file
- 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.
Task
A task that represents the asynchronous operation