WordToPdfConverterConvertToPdfAsync(Byte, CancellationToken) Method
Asynchronously converts a Word document to a PDF byte array.
The input must be a valid DOCX 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.WordToPdf (in Winnovative.Pdf.Next.WordToPdf.dll) Version: 20.0.0
public Task<byte[]> ConvertToPdfAsync(
byte[] wordBytes,
CancellationToken ct = default
)
- wordBytes Byte
- The content of the DOCX 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