I started this from simple example and here's the code.
I tested several pdf documents from url but I could see only blank spaces on my mobile screeen.
Those pdf documents was opened in the browsers though...
so am I missing something?
please get me some advices...
thanks in advance!!
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
PDFView pdfView = (PDFView) findViewById(R.id.pdfView);
pdfView.fromUri(Uri.parse("http://xxxxxx/xxx.pdf"))
.enableSwipe(true)
.enableDoubletap(true)
.swipeVertical(false)
.defaultPage(1)
.showMinimap(false)
.enableAnnotationRendering(false)
.password(null)
.showPageWithAnimation(true)
.load();
}
The library cant load from Http, you need download file and load from local Uri.
And remember you need
android.permission.WRITE_EXTERNAL_STORAGE
for download and read file.As per android official doc :