簡體   English   中英

如何從 URL 加載 webView 中的 PDF?

[英]How to load PDF in webView from URL?

I am creating and Android app that fetches file url from Parse server and displays the PDF in webView with the help of Google preview, directly loading the PDF into the webView takes forever to load.

但這里的問題是谷歌有 25mb 的限制,即無法預覽大於 25mb 的文件,並給出一條消息“哎呀文件大小太大”

使用 Google 預覽器,url 的外觀如下:

https://docs.google.com/viewer?url=http://my.domain.com/yourPdfUrlHere.pdf

有什么方法可以從 URL 加載 PDF 並顯示已經加載的內容,以便用戶不必永遠等待?

提前致謝..

webView.loadUrl("http://docs.google.com/gview?embedded=true&url=" + url);

這會將您的 URL 與 Google Docs PDF 查看器連接並加載它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM