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.

Definition

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

Parameters

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

Return Value

TaskByte
A byte array containing the generated PDF document

See Also