ContentResolverDataProvider

Data provider for opening PDF documents directly from a ContentProvider using Android's content resolver framework. PSPDFKit internally uses this data provider when loading a document from an Uri that uses the content:// or file:// scheme.

Constructors

Link copied to clipboard
constructor(@NonNull uri: Uri)
Creates the data provider for loading a document from the given content provider uri.

Properties

Link copied to clipboard
A field that generates the instances of this class from the provided Parcel.
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun canWrite(): Boolean
Indicates whether this data provider is writable.
Link copied to clipboard
open fun describeContents(): Int
Link copied to clipboard
open fun finishWrite(): Boolean
Called by PSPDFKit after all data has been written via write method.
Link copied to clipboard
open fun getSize(): Long
Return the actual file size of the PDF document which is provided by this data provider.
Link copied to clipboard
open fun getUid(): String
Unique document identifier used in all caching processes in PSPDFKit.
Link copied to clipboard
Called before writing to the file begins so the provider can prepare file output.
Link copied to clipboard
Reports whether this provider supports appending to output file as opposed to always rewriting it.
Link copied to clipboard
open fun write(data: Array<Byte>): Boolean
Called by PSPDFKit to write data to the document.
Link copied to clipboard
open fun writeToParcel(@NonNull dest: Parcel, flags: Int)