I have tried to display a PDF file by using a 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 cannot get the PDF to display unless I run it开发者_开发问答 through Adobe (so my app is downloading it), which then looks fine. How can I get the PDF to display using Adobe through my app or am I better off displaying the PDF as an image instead?
You'd have to build a pdf viewer to display it inside your app. Your best best is to launch the Intent like you are doing to display it in an external pdf viewer.
Check out this question for more.
Show PDF in Android
精彩评论