简体   繁体   English

PDF附件未在Android中打开

[英]PDF attachment not opening in android

I'm using web-view in an android application. 我在android应用程序中使用网络视图。 In that application I have to view attached PDF and images. 在该应用程序中,我必须查看附加的PDF和图像。 When I click image file it's opening fine, but when I click PDFs it's not opening. 当我单击图像文件时,它可以很好地打开,但是当我单击PDF时,它没有打开。

As said you need to use a native pdf renderer like RadaeePDF SDK for example, or you can try ( https://mozilla.github.io/pdf.js/ ) inside the webview. 如前所述,您需要使用本机pdf渲染器,例如RadaeePDF SDK ,或者您可以在webview中尝试( https://mozilla.github.io/pdf.js/ )。

Rendering using JS should work well on the webview of the versions 4.4 and 5.x, For earlier versions you can check Show PDF file in Android WebView using mozilla pdf.js Android API Level below 19 使用JS渲染应该在版本4.4和5.x的webview上运行良好,对于较早的版本,您可以使用19以下的mozilla pdf.js Android API级别选中在Android WebView中显示PDF文件。

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

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