Download On Main Thread Exception
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()
Content copied to clipboard
or better
openDocumentAsync(...).subscribeOn(Schedulers.io()).blockingSubscribe(
{ document -> ... },
{ error -> ... }
)
Content copied to clipboard