I tried to display a PDF file using WebView using the following code -
webview.loadUrl("http://www.mywebsite.co.uk/floorplan.pdf");
or
Uri uri = Uri.parse("http://www.mywebsite.co.uk/floorplan.pdf");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
Using either I canโt get the PDF to display if I didnโt run it through Adobe (so my application downloads it), which then looks good. How can I get PDFs to display using Adobe through my application, or am I better off displaying PDF as an image?
source
share