Reputation: 71
Is there any way to load PDF file from Asset/URL in Browser or WebView or any other way?
Upvotes: 4
Views: 4337
Reputation: 6892
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);
Upvotes: 1
Reputation: 3046
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.
Upvotes: 1