Content Resolver Data Provider
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.
Creates the data provider for loading a document from the given content provider uri
.
Parameters
A content provider URI with supported scheme (content://
or file://
).
Functions
Return the actual file size of the PDF document which is provided by this data provider. If the data provider can't determine the correct file size (e.g. in case of an error) this method has to return FILE_SIZE_UNKNOWN.
Called before writing to the file begins so the provider can prepare file output.
Reports whether this provider supports appending to output file as opposed to always rewriting it. If this returns false, only WriteMode.REWRITE_FILE will be used and the PDF file will always be fully rewritten on save.