是否有可能在SD卡/缓存的WebView打开PDF文件存储? [英] Is it possible to open pdf file store in sdcard/cache in webview?

查看:160
本文介绍了是否有可能在SD卡/缓存的WebView打开PDF文件存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载PDF文件在我的应用程序,并希望允许用户查看。是否有可能使用的WebView我可以显示下载到SD卡或本地存储的PDF文件。
当我知道有解决办法的,我可以提供的PDF文件,以谷歌的网址将在web视图打开PDF格式的链接。但它滞后和非常慢。

I am downloading PDF file in my application and want to allow user to view it. Is it possible that using webview I can display that pdf file downloaded to SD Card or local memory. As I know there is workaround in which I can provide the link of pdf file to google url which will open pdf in webview. But it lags and is very slow.

推荐答案

基本的回答,没有。你不能打开网页视图PDF文件;所以你要么需要触发一个意图打开文件(该文件,然后可以在默认情况下打开安装在设备上的应用程序);或写自己的PDF阅读器。

Basic answer, no. You can't open a PDF in a webview; so you either need to fire an Intent to open the file (the file can then open in the default installed app on the device); or write your own PDF reader.

这篇关于是否有可能在SD卡/缓存的WebView打开PDF文件存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆