在移动Chrome浏览器的iframe中显示PDF,而不是下载到设备 [英] Display PDF in iframe in Mobile Chrome instead of downloading to device

查看:3778
本文介绍了在移动Chrome浏览器的iframe中显示PDF,而不是下载到设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有显示PDF文件的iframe的页面。在移动Chrome浏览器以外的每个浏览器中都能正常工作当页面打开时,PDF将下载到手机或平板电脑,并且页面显示为空。有没有办法强制文件显示而不是下载?

I have a page with an iframe that displays a PDF file. It works fine in every browser except mobile Chrome. When the page opens, the PDF downloads to the phone or tablet and the page appears empty. Is there a way to force the file to display rather than downloading?

推荐答案

这个问题很老,但我发现它)
对于正在寻找解决方案的所有人:尝试使用 http://googlesystem.blogspot.ru/2009/09/embeddable-google-document-viewer.html

This question are very old, but I find it in top of google )) For everyone who is looking for the solution: try to use http://googlesystem.blogspot.ru/2009/09/embeddable-google-document-viewer.html

如果你的文件可以通过互联网进行(并且不需要在网站上自动生成),你可以用iframe嵌入它。

If your file avalible via internet (and do not require autorisation on site), you can embed it with iframe.

这篇关于在移动Chrome浏览器的iframe中显示PDF,而不是下载到设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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