[英]Reading Pdf, Doc, Ppt and xls files in android and ios using phonegap
I am searching for the way to open and read Pdf, Doc, Ppt and xls files in my hybrid app developed using Sencha Touch 2.4 with Phonegap (Android & Ios). 我正在寻找使用Sencha Touch 2.4和Phonegap(Android&Ios)开发的混合应用程序中打开和读取Pdf,Doc,Ppt和xls文件的方法。
What i did so far 我到目前为止所做的
I got to know by searching that Ios WebView supports Pdf, Doc, Ppt, But not on Android WebView. 通过搜索了解到Ios WebView支持Pdf,Doc,Ppt,但不支持Android WebView。 So i can't use WebView for both Android and Ios. 所以我不能同时为Android和Ios使用WebView。
Device need to work in offline So, i can't use google doc viewer. 设备需要在离线状态下工作因此,我无法使用Google文档查看器。
Tried cordova-plugin-file-opener2 File Opener, But always getting "Error status: 9 - Error message: File not found" 尝试cordova-plugin-file-opener2文件打开器 ,但始终获取“错误状态:9-错误消息:找不到文件”
How can i achieve this ? 我怎样才能做到这一点?
try with inAppBrowser plugin 尝试使用inAppBrowser插件
https://github.com/apache/cordova-plugin-inappbrowser https://github.com/apache/cordova-plugin-inappbrowser
for iOS use 供iOS使用
cordova.InAppBrowser.open('yourFileUrl', '_blank');
for android use: 供Android使用:
cordova.InAppBrowser.open('yourFileUrl', '_system');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.