InstantPdfActivity

Activity with fully integrated views and behaviour. Can be invoked by the simple helper method showInstantDocument.

For more advanced customization use InstantPdfActivityIntentBuilder to generate an Intent with proper parameters.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Returns the PdfDocument that is loaded into this pdf UI, or null if no document has been loaded yet.
Link copied to clipboard
Returns the coordinator responsible for displaying documents and switching between multiple loaded documents.
Link copied to clipboard
Returns the PdfFragment that is used to show the document.
Link copied to clipboard
Called when authentication with Instant Server (PSPDFKit Document Engine) has failed.
Link copied to clipboard
open fun onAuthenticationFinished(@NonNull instantDocument: InstantPdfDocument, @NonNull validJwt: String)
Called when authentication with Instant Server (PSPDFKit Document Engine) has successfully finished.
Link copied to clipboard
open fun onDocumentCorrupted(@NonNull instantDocument: InstantPdfDocument)
Called when InstantPdfDocument has detected data corruption.
Link copied to clipboard
open fun onDocumentInvalidated(@NonNull instantDocument: InstantPdfDocument)
Called when InstantPdfDocument becomes invalid.
Link copied to clipboard
Called when the document changes its state.
Link copied to clipboard
open fun onSyncError(@NonNull instantDocument: InstantPdfDocument, @NonNull error: InstantException)
Called when annotation sync has been finished with an error.
Link copied to clipboard
open fun onSyncFinished(@NonNull instantDocument: InstantPdfDocument)
Called when annotation sync has been finished successfully.
Link copied to clipboard
open fun onSyncStarted(@NonNull instantDocument: InstantPdfDocument)
Called when annotation sync has been started.
Link copied to clipboard
Returns the PdfFragment that is used to show the document.
Link copied to clipboard
open fun setDocument(@NonNull serverUrl: String, @NonNull jwt: String)
Loads a new Instant document in this activity and replaces the existing one.
Link copied to clipboard
open fun setDocumentFromDataProvider(@NonNull dataProvider: DataProvider, @Nullable password: String)
Loads a new document in this activity and replaces the existing one.
Link copied to clipboard
open fun setDocumentFromDataProviders(@NonNull dataProviders: List<DataProvider>, @Nullable passwords: List<String>)
Loads a new document in this pdf UI and replaces the existing one.
Link copied to clipboard
open fun setDocumentFromUri(@NonNull documentUri: Uri, @Nullable password: String)
Loads a new document in this activity and replaces the existing one.
Link copied to clipboard
open fun setDocumentFromUris(@NonNull documentUris: List<Uri>, @Nullable passwords: List<String>)
Loads a new document in this activity and replaces the existing one.
Link copied to clipboard
open fun showInstantDocument(@NonNull context: Context, @NonNull serverUrl: String, @NonNull jwt: String, @Nullable configuration: PdfActivityConfiguration)
Opens a new InstantPdfActivity displaying server document.