Document Descriptor
Describes a document and its UI state. The DocumentDescriptor is used by the PdfActivity's DocumentCoordinator to handle multiple loaded documents and to manage their state.
Document is represented by the list of parcelable DocumentSources. Descriptor also holds loaded PdfDocument after it's loaded by the DocumentCoordinator. Note that this PdfDocument instance won't be restored after reading from the parcel - it must be loaded again in this case.
Properties
Link copied to clipboard
Creator for Parcelable implementation.
Link copied to clipboard
Custom title that will be displayed in the UI instead of document title.
Link copied to clipboard
The loaded PDF document instance, or null if not yet loaded.
Link copied to clipboard
The list of document sources from which the document is loaded.
Link copied to clipboard
Whether this descriptor represents an image document rather than a PDF.
Functions
Link copied to clipboard
Describes the kinds of special objects contained in this Parcelable instance.
Link copied to clipboard
open fun fromDataProvider(@NonNull dataProvider: DataProvider, @Nullable password: String): DocumentDescriptor
open fun fromDataProvider(@NonNull dataProvider: DataProvider, @Nullable password: String, @Nullable contentSignature: String): DocumentDescriptor
Creates descriptor for document loaded from data provider.
Link copied to clipboard
open fun fromDataProviders(@NonNull dataProviders: List<DataProvider>, @Nullable passwords: List<String>, @Nullable contentSignatures: List<String>): DocumentDescriptor
Creates descriptor for compound document loaded from data providers.
Link copied to clipboard
Creates descriptor for loaded document.
Link copied to clipboard
Creates descriptor for document loaded from document source.
Link copied to clipboard
Creates descriptor for compound document loaded from document sources.
Link copied to clipboard
Returns source from which the document should be loaded.
Link copied to clipboard
Creates descriptor for image document loaded from data provider.
Link copied to clipboard
open fun imageDocumentFromDocumentSource(@NonNull documentSource: DocumentSource): DocumentDescriptor
Creates descriptor for image document loaded from a document source.
Link copied to clipboard
Creates descriptor for image document loaded from URI.
Link copied to clipboard
Writes this document descriptor to a Parcel.