open Document Async
open fun openDocumentAsync(@NonNull context: Context, @NonNull 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.
Return
Single observable returning an ImageDocument instance if the opening succeeded.
Parameters
context
Application context.
document Uri
Uri pointing to the PDF document.
Throws
If PSPDFKit was not initialized with initialize call.
open fun openDocumentAsync(@NonNull context: Context, @NonNull source: DocumentSource): 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.
Return
Single observable returning an ImageDocument instance if the opening succeeded.
Parameters
context
Application context.
source
DocumentSource describing the source of the image document.
Throws
If PSPDFKit was not initialized with initialize call.