简体   繁体   English

如何使用可点击链接呈现pdf?

[英]How to render pdf with clickable links?

I use PdfRenderer class to render pdf. 我使用PdfRenderer类来呈现pdf。 However, the problem is that in this approach I can't make the hyperlinks in the document clickable. 但是,问题是在这种方法下,我无法使文档中的超链接可单击。

Is there any better way to render pdf in android application? 有没有更好的方法在Android应用程序中呈现pdf?

I am aware of using webview with google docs, but I want the app to work offline so this solution is not suitable. 我知道可以将Webview与google docs一起使用,但是我希望该应用程序可以脱机工作,因此该解决方案不适合。

Try using pdfjs that is used by Mozilla. 尝试使用Mozilla使用的pdfjs。

Follow this answer 遵循这个答案

https://stackoverflow.com/a/26086480/10587375 https://stackoverflow.com/a/26086480/10587375

This method works for sure on Android 4.0 and above 此方法在Android 4.0及更高版本上肯定有效

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

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