newInstance

open fun newInstance(@NonNull serverUrl: String, @NonNull jwt: String, @NonNull configuration: PdfConfiguration): InstantPdfFragment

Creates and returns a new Fragment to display a PDF document downloaded from Instant Server (PSPDFKit Document Engine).

Return

New instance of fragment that can be attached to view hierarchy.

Parameters

serverUrl

Url of the Instant Server (PSPDFKit Document Engine) - used to initialize InstantClient.

jwt

Authentication token used to authenticate access to the document.

configuration

Configuration for PDF display generated with .


Creates and returns a new Fragment to display a PDF document from an already opened instance. This will not reload the document.

Return

New instance of fragment that can be attached to view hierarchy.

Parameters

document

An already opened instance of a PdfDocument object.

configuration

Configuration for PDF display generated with .