OpenAsync(Stream, ViewerOptions?, CancellationToken) Method

Definition

Assembly Broadside.Viewer.dll

Opens a document from a stream asynchronously (a browser file or a network stream): a stream that cannot seek is read into memory without blocking.

public static Task<DocumentSession> OpenAsync(Stream stream, ViewerOptions? options, CancellationToken cancellationToken)

Parameters

stream
Stream

The stream, which the caller keeps open for the session's lifetime when it can seek.

options
ViewerOptions

The session's options, or null for defaults.

cancellationToken
CancellationToken

Stops the read.

Returns

Task<DocumentSession>
The session; the caller closes it.

Remarks

ISO 32000-2 §7.5.