在Android的手机打开PDF使用IBM工作灯工作室 [英] Open pdf in Android Mobile using IBM Worklight studio
问题描述
我需要Android移动设备打开一个PDF文件。
对于这一点,我有中常见的添加文件夹的test.pdf的PDF文件,并添加config.xml文件(RES / XML / config.xml)中插件(Childbrowser)。并再次添加childbrowser.js和cordova.js文件夹的js
I need to open a pdf in android mobile device. For that ,I have add a 'test.pdf' pdf file in common folder and add plugin (Childbrowser ) in config.xml file (res/xml/config.xml). And again add childbrowser.js and cordova.js file in js folder .
和添加code在这里打开PDF文件---
window.open('./的test.pdf','_系统','位置= YES');
但还是异常来了这样的'目标文件不可用'andgive路径
file.///data/data/
我想加载在Android手机的的test.pdf文件并打开该文件。
但它是不开放。
请建议我一个解决方案。谢谢
And add a code to open a pdf file here--- window.open('./test.pdf','_system','location=yes'); But still exception is coming like that 'Target file is not available' andgive a path file.///data/data/ I want to load that test.pdf file in the android mobile and open that particular file . But it is not opening . Please suggest me a solution. Thanks
推荐答案
不幸的是,Android不支持在网页视图中查看PDF开箱。大多数结果指出了使用谷歌文档。
Unfortunately, Android does not support viewing PDFs out of the box in a WebView. Most results point to using Google Docs.
下面是一些建议:
- 在WebView中 开启PDF
- How在网页视图在Android开放本地PDF文件?
- 的http://developer.appcelerator.com/question/147570/open-remote-pdf-file-on-webview-in-android
搜索结果 - 这可以通过结合科尔多瓦插件和这个本土code做的:的 http://kylewbanks.com/blog/Loading-PDF-in-Android-WebView
- 的http:// asmncl。 blogspot.co.il/2012/06/android-open-pdf-file-in-webview.html
- Open PDF in a WebView
- How to open local pdf file in webview in android?
- http://developer.appcelerator.com/question/147570/open-remote-pdf-file-on-webview-in-android
- This you could do by combining a Cordova plug-in and this native code: http://kylewbanks.com/blog/Loading-PDF-in-Android-WebView
- http://asmncl.blogspot.co.il/2012/06/android-open-pdf-file-in-webview.html
这篇关于在Android的手机打开PDF使用IBM工作灯工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!