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
Namespace: Winnovative.Pdf.NextAssembly: Winnovative.Pdf.Next.ExcelToPdf (in Winnovative.Pdf.Next.ExcelToPdf.dll) Version: 20.0.0
public Task<byte[]> ConvertToPdfAsync(
byte[] excelBytes,
CancellationToken ct = default
)
- 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
TaskByteA byte array containing the generated PDF document