OpenAsync(Stream, PdfOptions, CancellationToken) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Opens the PDF file held by stream, from its current position; a non-seekable stream is read asynchronously.

public static Task<PdfDocument> OpenAsync(Stream stream, PdfOptions options, CancellationToken cancellationToken)

Parameters

stream
Stream

The stream. It is not disposed; a seekable stream must stay open and unchanged until the document is disposed.

options
PdfOptions

The options.

cancellationToken
CancellationToken

Cancels reading a non-seekable stream.

Returns

Task<PdfDocument>
The document. Dispose it when done.

Remarks

ISO 32000-2 §7.5. The same as OpenAsync(Stream, CancellationToken) on an engine built from options.