OpenAsync(HttpClient, Uri, PdfOptions, CancellationToken) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Opens the remote PDF file at uri through HTTP range requests.

public static Task<PdfDocument> OpenAsync(HttpClient httpClient, Uri uri, PdfOptions options, CancellationToken cancellationToken)

Parameters

httpClient
HttpClient

The client the requests go through; not disposed. It stays in use until the document is disposed.

uri
Uri?

The file's address.

options
PdfOptions

The options, such as the range block size, cache limit and whether synchronous reads may fetch.

cancellationToken
CancellationToken

Cancels the requests made while opening.

Returns

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

Remarks

Spec #33, viewer capability 5. The same as OpenAsync(HttpClient, Uri, CancellationToken) on an engine built from options.