InstantPdfDocument

PDF document managed by Instant. To create an instance use InstantClient.openDocument or InstantClient.openDocumentAsync.

Types

Link copied to clipboard
object Companion

Companion object containing constants for InstantPdfDocument configuration.

Properties

Link copied to clipboard
Link copied to clipboard

Delay in milliseconds before kicking off automatic sync after local changes are made to the document.

Link copied to clipboard

Returns the current state of this Instant document.

Link copied to clipboard

Returns instant client managing this document.

Link copied to clipboard

Returns instant document handle for this document.

Link copied to clipboard

Whether to listen to server changes for this document.

Functions

Link copied to clipboard

Adds listener for instant document events. If the listener has already been added previously, this method will be a no-op. Adding null is not allowed, and will result in an exception.

Link copied to clipboard

Returns AnnotationProvider object which handles annotations contained in this document.

Link copied to clipboard
abstract fun notifyConnectivityChanged(isConnected: Boolean)

Notify Instant that connection has changed. Calling this method is optional. Annotation sync behaves by default as if being connected all the time. Failed requests are retried with increasing backoff when sync fails.

Link copied to clipboard
abstract fun reauthenticateWithJwt(jwt: String)

Updates the token used to authenticate access to the document with a new JWT. This allows annotations to be synced again after the initial token used to download the document has expired.

Link copied to clipboard
abstract fun reauthenticateWithJwtAsync(jwt: String): Completable

Updates the token used to authenticate access to the document with a new JWT, asynchronously. This allows annotations to be synced again after the initial JWT used to download the document has expired.

Link copied to clipboard

Removes listener, previously registered via addInstantDocumentListener. Upon calling this method the listener will no longer be notified of any changes. If the listener has not been added, this method will be a no-op. Adding null is not allowed, and will result in an exception.

Link copied to clipboard
abstract fun removeLocalStorage()

Removes local storage for this document. Document will be invalid after returning from this method. Use this to clean-up locally cached data for documents that won't be used anymore or that has been corrupted due to internal error.

Link copied to clipboard
abstract suspend fun syncAnnotations()

Starts annotation sync and suspends until its completion.

Link copied to clipboard
abstract fun syncAnnotationsAsync(): Flowable<InstantProgress>

Syncs annotations with Instant Server (Nutrient Document Engine) asynchronously.