java.lang.Object | |
↳ | com.pspdfkit.instant.client.InstantDocumentDescriptor |
Descriptor/handle for InstantPdfDocument
that provides methods for downloading/opening
instant documents.
Each descriptor describes a single Instant document layer defined by the Document id and layer
name. Both of these are encoded in the JWT used for authentication provided via openDocumentAsync(String)
or downloadDocumentAsync(String)
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized Flowable<InstantProgress> |
downloadDocumentAsync(String jwt)
Downloads document from instant server asynchronously.
| ||||||||||
String |
getCreatorName()
Returns the creator name set in the JWT — if any.
| ||||||||||
String |
getDocumentId()
Document Id of the managed document.
| ||||||||||
String |
getJwt()
JWT used to authenticate access to the document.
| ||||||||||
String |
getLayerName()
Name of the managed document layer.
| ||||||||||
String |
getUserId()
Id of the user the layer managed by the handle belongs to.
| ||||||||||
boolean |
isDownloaded()
Check whether document is already downloaded.
| ||||||||||
InstantPdfDocument |
openDocument(String jwt)
Downloads and opens document from instant server (synchronously).
| ||||||||||
Single<InstantPdfDocument> |
openDocumentAsync(String jwt)
Downloads and opens document from instant server asynchronously.
| ||||||||||
void |
removeLocalStorage()
Removes local storage for this layer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Downloads document from instant server asynchronously.
downloadDocumentAsync
does not operate by default on a particular Scheduler.
jwt | JWT used to authenticate access to the document. |
---|
Returns the creator name set in the JWT — if any.
The JWTs issued by your backend server may define a name that should be attached to all
annotations created by the bearer of this token under the (optional) key
creator_name
. In contrast to the user_id
, which uniquely identifies the
bearer of the JWT as a specific user, and is likely to contain numbers etc. for
disambiguation, the creator_name
is meant to be human readable. In effect, it is
perfectly acceptable for two users (as distinguished by their user_id
) to have the
same creator name.
creator_name
claim in the JWT.
Document Id of the managed document.
JWT used to authenticate access to the document.
Name of the managed document layer.
Id of the user the layer managed by the handle belongs to.
May be null for document descriptors that have been instantiated via the legacy API, or with a JWT that does not contain the `user_id` claim.
Check whether document is already downloaded.
Downloads and opens document from instant server (synchronously).
jwt | JWT used to authenticate access to the document. |
---|
InstantPdfDocument
or error when document could not
be downloaded or opened.
Downloads and opens document from instant server asynchronously.
openDocumentAsync
does not operate by default on a particular Scheduler.
jwt | JWT used to authenticate access to the document. |
---|
InstantPdfDocument
or error when document could not
be downloaded or opened.
Removes local storage for this layer. Document will be invalid after returning from this method.