如何在不“下载"的情况下通过 Android 网络浏览器显示 PDF第一的 [英] How to display a PDF via Android web browser without "downloading" first

查看:19
本文介绍了如何在不“下载"的情况下通过 Android 网络浏览器显示 PDF第一的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让现有的 Android 浏览器自动打开 PDF、Word 或其他典型文件,而无需经过下载文件的过程,然后让用户从下载"应用程序或通知栏?

Is there a way to get the stock Android browser to auto-open a PDF, Word or other typical file without having to go through the process of downloading the file and then getting the user to open the file from the Downloads app or the Notification bar?

我们有一个 Web 应用程序,其中包含许多我们想要包含的文档,而不必将其转换为 HTML,但是让用户下载文件并手动打开它并不容易对用户进行培训.

We have a web application that has a lot of documents that we'd like to include and not have to convert to HTML, but making the user download the file and manually open it is not easy to train users on.

在 iOS 上,这些文件都显示在浏览器中.我想要一种让浏览器自动将文件启动到 Acrobat Reader 或 QuickOffice 或用户必须显示它们的任何程序的方法.

On iOS, these files all display inline in the browser. I'd like a way to get the browser to auto-launch the files into Acrobat Reader or QuickOffice or whatever program the user has to display them.

有人知道怎么做吗?我知道 Google Docs 有一些 PDF 查看支持,但使用我们的网络应用程序的人可能并非在所有情况下都可以访问公共互联网,并且可能会访问本地网络服务器.

Does anyone know a way to do that? I know that Google Docs has some PDF viewing support, but people using our web app may not have public Internet access in all cases, and may be hitting on a local web server.

推荐答案

您可以通过将 URL 附加到以下位置在 Google 文档查看器中打开 PDF:

You can open PDF in Google Docs Viewer by appending URL to:

http://docs.google.com/gview?embedded=true&url=<url of a supported doc>

这将在默认浏览器或 WebView 中打开 PDF.

This would open PDF in default browser or a WebView.

此处提供了支持格式的列表一>.

这篇关于如何在不“下载"的情况下通过 Android 网络浏览器显示 PDF第一的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆