简体   繁体   English

无法在Android Mobile中打开PDF文件

[英]PDF File is not opening in Android Mobile

PDF file is not showing PDF文件未显示

 <html> <body > <div data-role="content"> <object data="Telugu Calendar 2016.pdf" type="application/pdf" width="500" height="200"> <a href="Telugu Calendar 2016.pdf">Brochure</a> </object> </div> </body> </html> 

in android mobile i am writing coding below 在Android Mobile中,我正在下面编写代码

this same Exute in browser working fine but in android mobile pdf not showing i am new one to phonegap Please Help me 这个相同的Exute在浏览器中工作正常,但在android移动pdf中未显示我是phonegap的新用户,请帮助我

As far as i know, Android don't support viewing PDFs out of the box in a WebView. 据我所知,Android不支持在WebView中开箱即用地查看PDF。 You gotta use some cordova plugins like PDFViewer-Plugin or DocumentViewer-Plugin to achieve this in android mobiles. 您必须使用诸如PDFViewer-PluginDocumentViewer-Plugin之 类的 cordova插件在android手机中实现此目的。

Android provides PdfRenderer class (Added in API level 21). Android提供了PdfRenderer类(在API级别21中添加)。

You can try also to implement it using this . 您也可以尝试使用this实现它。

I hope it will help you. 希望对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM