简体   繁体   English

使用phonegap在android和ios中读取pdf,doc,ppt和xls文件

[英]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 我到目前为止所做的

  1. 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。

  2. Device need to work in offline So, i can't use google doc viewer. 设备需要在离线状态下工作因此,我无法使用Google文档查看器。

  3. 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.

相关问题 我无法显示ppt实际上,我不仅要在视图中显示ppt,还要显示doc / ppt / pdf / xls文件…在android中 - Iam not able to display the ppt infact i want to display not only ppt but also doc/ppt/pdf/xls files in a view… in android React-Native Webview 无法在 iOS 中的 android 中正常加载 ppt、xls、doc 文件 - React-Native Webview not able to load ppt, xls, doc file in android in iOS working properly 如何在App中打开doc / xls / ppt / pdf / dwg? - How to open doc/xls/ppt/pdf/dwg in a App? Android Webview下载并查看pdf,xls或doc文件 - Android webview download and view pdf, xls or doc files 在android和IOS phonegap应用程序中读取pdf文件 - Reading a pdf file in android and IOS phonegap app 在android webview中下载文件(pdf,ppt,xls)以下载没有浏览器的文件夹 - Download files (pdf , ppt , xls) in android webview to download folder without browser doc、ppt、xls mime 类型 - Doc, ppt, xls mime type 无法在MARSHAMALLOW文件选择器中选择pdf,doc,ppt之类的文件 - unable to pick files like pdf,doc,ppt in MARSHAMALLOW file chooser 如何在Android中将任何文件格式(doc,ppt,xls)渲染为可打印格式? - How to render any file format(doc,ppt,xls) into printable format in android? 在android中从sdcard到webview打开doc,xls,pdf等文件 - Open file such as doc,xls,pdf from sdcard to webview in android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM