简体   繁体   中英

How can i view pdf in android without pdf Application in device?

我想从互联网查看pdf文件。有人可以告诉我如何查看吗?

Please Use This code For view Online PDF without Using PDF of Application

mWebView.loadUrl("http://docs.google.com/gview?embedded=true&url=http://your_link/634128127095123576.pdf");

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);

Please view this answer for more details: how to develop a pdf reader in android

But please be aware that webview does create some extra threads like Cookie Manager and history manager , it might just increase your memory foot print a bit. I saw this behaviour when i looked at threads created in Eclipse ADT plugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM