ImageDocumentLoader

Helper class for loading ImageDocument from a DocumentSource.

Functions

Returns default activity configuration for image documents.

Returns default activity configuration for image documents from a given initial configuration. For a better user experience, thumbnail bar and page number overlay will be hidden, layout mode will be set to PageLayoutMode.SINGLE and fit mode will be set to PageFitMode.FIT_TO_SCREEN.

Link copied to clipboard
fun openDocument(context: Context, documentUri: Uri): ImageDocument

Opens an image document from a Uri. Note that currently only local files are supported and passing remote or non-file Uris will throw an java.io.IOException.

Opens an image document from a Uri. Note that currently only local files are supported and passing remote or non-file Uris will throw an java.io.IOException.

Link copied to clipboard
fun openDocumentAsync(context: Context, documentUri: Uri): Single<ImageDocument>

Opens an image document from a Uri. Note that currently only local files are supported and passing remote or non-file Uris will throw an java.io.IOException.