gpt4 book ai didi

android - 在应用程序中显示 pdf 文件

转载 作者:行者123 更新时间:2023-11-29 02:39:30 28 4
gpt4 key购买 nike

我在设备中的已知位置下载了 pdf 文件。我想在我的应用程序中显示它。我尝试了几个 pdf 查看器库,例如:

https://github.com/JoanZapata/android-pdfview         <--- This is deprecated.
https://github.com/jblough/Android-Pdf-Viewer-Library <--- Does not display pdf properly. I mean it has several issues while loading pdf.
https://github.com/barteksc/AndroidPdfViewer <--- So far best I could find over the internet.


但是以上都无法通过超链接导航到文件中的特定标题


我知道我可以在 Google 云端硬盘查看器 中显示 pdf 文件,但我不想这样。
所以任何人都可以在 android 中向我推荐相关的 pdf 查看器库,我可以将其插入到我的项目中?

最佳答案

使用 google doc viewer 查看 pdf,无需任何外部库。

String pdf = "http://www.pdf995.com/samples/pdf.pdf";
webview.loadUrl("http://drive.google.com/viewerng/viewer?embedded=true&url=" + pdf);

关于android - 在应用程序中显示 pdf 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45215282/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com