我将PDF下载到我的目录/storage/sdcard/.../example.pdf中。 现在我想在Phonegap的InAppBrowser中打开它。
var blaPath = fileEntry.fullPath.substring(7);
window.open(encodeURI(blaPath), '_blank', 'location=yes');
如果我不从路径中删除前7个字符(File://),InAppBrowser会打开,但它会保持白色。我听说,我必须为Android删除这些字符。
但是当我删除它们时,我会在
下找到一个未找到的网站 Path: file:///android_asset/www//storage/sdcard0/.../example.pdf
如何通过InAppBrowser正确打开外部PDF?
更新:在进一步研究中,我发现this:
可能是,在Android ???上无法通过InAppBrowser查看PDF
更新2: Android似乎没有原生PDF查看器。 我使用了我编写的PDFViewer插件在已安装的PDF阅读器上打开PDF。
答案 0 :(得分:0)