Click or drag to resize

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.HtmlToPdf
Assembly: ephtmltopdf (in ephtmltopdf.dll) Version: 22.0.0
Syntax
public Task<byte[]> GetPdfBytesFromHtmlFileAsync(
	string htmlFilePath,
	CancellationToken cancellationToken = default
)

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

TaskByte
A task whose result is the binary representation of the PDF document.
Remarks
See GetPdfBytesFromUrlAsync(String, CancellationToken) for how the conversion runs and how cancellation works.
See Also