OpenAsync(HttpClient, Uri, ViewerOptions?, CancellationToken) Method

Definition

Assembly Broadside.Viewer.dll

Opens a remote document over HTTP range requests, first page first: pages are fetched as they are needed, and before each use the session prefetches what the page needs, so this works where synchronous fetching is impossible (the browser).

public static Task<DocumentSession> OpenAsync(HttpClient httpClient, Uri uri, ViewerOptions? options, CancellationToken cancellationToken)

Parameters

httpClient
HttpClient

The client the requests go through.

uri
Uri?

The document's address.

options
ViewerOptions

The session's options, or null for defaults.

cancellationToken
CancellationToken

Stops the open.

Returns

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

Remarks

ISO 32000-2 §7.5 and Annex F (linearized files). Spec #33 viewer capability 5.