Download PDF file for offline viewing


I’m trying to cache PDF files on the user’s device and open them within my app at a later time.

With this package:

I use pdfView.fromUri(uri) which loads the file from the URL every time the page is loaded.
Is there a function I can use to cache these files for offline viewing?


Download the PDF yourself, using your favorite HTTP client API. Then, use fromFile() rather than fromUri().

Answered By – CommonsWare

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published