The original repo is here pdfview (Thanks Dmitry-Borodin for such a nice library)
This forked version is just hosted on a different maven due to JCenter has deprecated.
Android PDF view - small (73kB .aar file, ~400 methods before minification) and efficient PDF viewer embedded in your native app
It is based on ImageView and can handle big files with reasonable scrolling and zooming performance.
This is how fast scrolling of 680 page document looks like on low-end device:
To show pdf you just need a file on the device.
findViewById<PDFView>(R.id.activityMainPdfView).fromAsset("paper.pdf").show()
See sources for other methods to provide a file.
If pdf is on remote host - use your network client to download it to the cache folder, then show it. This library provides view, it doesn't do network requests.
There is a sample of how to do it.
Add it in your root build.gradle at the end of repositories:
repositories {
...
maven { url 'https://jitpack.io' }
}
Add gradle dependency:
implementation 'com.github.devendroid:pdfview-android:1.0.0'
Please take a look into the wiki to find out the technical details.
Contributions are welcome. Just open PR to dev branch.
Feel free to open issue with any questions.
Thanks to Manuel Lilienberg for initial implementation of this library and subsampling-scale library for influence.