ImageDocument

interface ImageDocument

An image document. To create an instance use ImageDocumentLoader.openDocument (with a Context and Uri, or a DocumentSource) or related static async methods.

Properties

Link copied to clipboard
abstract val document: PdfDocument?

The converted Pdf document, or null if the image document couldn't be converted.

Link copied to clipboard

The image document source, which may be a DataProvider or a file Uri.

Link copied to clipboard

Whether the document is editable (comes from a file URI or from another source that supports writing).

Functions

Link copied to clipboard
abstract fun saveIfModified(): Boolean
abstract fun saveIfModified(metadata: Boolean): Boolean
abstract fun saveIfModified(documentSaveOptions: DocumentSaveOptions, metadata: Boolean): Boolean

Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified. Note that this may take a while and should not be called on the main thread.

Link copied to clipboard
abstract suspend fun saveIfModifiedAsync(): Boolean
abstract suspend fun saveIfModifiedAsync(metadata: Boolean): Boolean
abstract suspend fun saveIfModifiedAsync(documentSaveOptions: DocumentSaveOptions, metadata: Boolean): Boolean

Saves the image document to its original location if it has been changed. If there were no changes, the image document file will not be modified.