本文介绍了通过 Google docs 达到在 WebView 中查看 pdf 文件的带宽限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 android 应用程序,它在 WebView 中使用 google doc 的链接前缀显示来自链接的 pdf 文件.有时,不是太频繁,而不是在 webview 中显示内容:

I have an android application that shows pdf files from link using google doc's link prefix in WebView. Sometimes, not too often, instead of showing the content in webview it shows:

您已达到查看或下载文件的带宽限制不是 Google 文档格式的.请稍后再试.你可以也可以尝试通过单击此处下载原始代码"

Google 的支持页面 说带宽限制是每个 300 MB小时,但问题是我的 pdf 文件的大小是 300-400 kb,之前甚至没有显示过一次.我怎样才能避免这个问题?或者如果可能的话,建议任何其他方式从链接显示 pdf.谢谢.

Google's support page tells that the bandwidth limit is 300 MB per hour, but the thing is my pdf files' size is 300-400 kb and it wasn't shown even a single time before.How can i avoid this problem? Or suggest any other ways to display pdf from link if possible.Thank you.

推荐答案

如原发帖人所愿,评论为答案:

As wished by the original poster, the comment as an answer:

Google Docs 很可能确实计算了呈现文档的大小(有点似是而非;他们呈现 PDF 并将其作为 Google Docs 文档提供).在这种情况下,您可以轻松地获得每页 1 MB,无论 PDF 有多大.而且,如果您处理准备不充分的可供印刷的 PDF,您可以很容易地填满您的每小时配额.

It is very likely that Google Docs does calculate in the size of the rendered document (kind of plausible; they render the PDF and make it available as Google Docs document). In this case, you may easily get 1 MB per page, no matter how small or big the PDF is. And if you deal with badly prepared press-ready PDFs, you very easily can fill up your hourly quota.

这篇关于通过 Google docs 达到在 WebView 中查看 pdf 文件的带宽限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 16:58