ExcelToPdfConverterConvertToPdfAsync(Byte, CancellationToken) Method

Asynchronously converts an Excel document to a PDF byte array. The input must be a valid .xlsx file provided as a byte array. The resulting PDF content is returned as a byte array, which can be saved, streamed or transmitted as needed

Definition

Namespace: Winnovative.Pdf.Next
Assembly: Winnovative.Pdf.Next.ExcelToPdf (in Winnovative.Pdf.Next.ExcelToPdf.dll) Version: 20.0.0
C#
public Task<byte[]> ConvertToPdfAsync(
	byte[] excelBytes,
	CancellationToken ct = default
)

Parameters

excelBytes  Byte
The content of the .xlsx file as a byte array
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

Return Value

TaskByte
A byte array containing the generated PDF document

See Also