DownloadOnMainThreadException

Thrown if you try to open a remote document/image with any of the PdfDocumentLoader or ImageDocumentLoader open methods on the main thread. If you really need to do a blocking call on the main thread use either:

openDocumentAsync(...).subscribeOn(Schedulers.io()).blockingGet()

or better

openDocumentAsync(...).subscribeOn(Schedulers.io()).blockingSubscribe(
{ document -> ... },
{ error -> ... }
)

Constructors

Link copied to clipboard
constructor()