4

Is there any way to load PDF file from Asset/URL in Browser or WebView or any other way?

Morgen
  • 71
  • 1
  • 4

2 Answers2

1

There is no native way to do this at the moment. However, you could write your own pdf viewer activity. Also, check out RepliGo Reader and PDF GView.

zfedoran
  • 2,986
  • 4
  • 22
  • 25
1

Instead loading PDF file from local resource, you can think about open it online using Google Docs Viewer:

WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true); 
String pdf = "http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf";
webview.loadUrl("http://docs.google.com/gview?embedded=true&url=" + pdf);
anticafe
  • 6,816
  • 9
  • 43
  • 74