PdfConverterGetPdfBytesFromHtmlFileAsync Method |
Converts the specified HTML file into a PDF document asynchronously and returns the rendered PDF document as an array of bytes.
Namespace: ExpertPdf.HtmlToPdfAssembly: ephtmltopdf (in ephtmltopdf.dll) Version: 22.0.0
Syntaxpublic Task<byte[]> GetPdfBytesFromHtmlFileAsync(
string htmlFilePath,
CancellationToken cancellationToken = default
)
Public Function GetPdfBytesFromHtmlFileAsync (
htmlFilePath As String,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of Byte())
Parameters
- htmlFilePath String
- The full path of the HTML file to be converted to PDF.
- cancellationToken CancellationToken (Optional)
- A token that cancels the wait for the conversion.
Return Value
TaskByteA task whose result is the binary representation of the PDF document.
Remarks
See Also