openDocumentAsync

fun openDocumentAsync(context: Context, documentUri: Uri, password: String? = null): Single<PdfDocument>

Opens a PDF document from a Uri. Remote Uri's are supported and automatically downloaded. The returned Single may fail with an InvalidPasswordException if no password or a wrong password was provided for opening the document. It may also fail with a DownloadException if anything happened during the download of a remote Uri.

Return

Observable which returns a single opened document when called successfully.

Parameters

context

Application context.

documentUri

Uri pointing to the PDF document.

password

PDF document password, may be null.

Throws


Opens a PDF document from a DocumentSource. Remote Uri's are supported and automatically downloaded. The returned Single may fail with an InvalidPasswordException when trying to open a password protected document. It may also fail with a DownloadException if anything happened during the download of a remote Uri.

Return

Observable which returns a single opened document when called successfully.

Parameters

context

Application context.

source

DocumentSource of the document.

Throws