环境考虑在iframe中显示PDF [英] Environment considerations for displaying a pdf in an iframe

查看:362
本文介绍了环境考虑在iframe中显示PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面的iframe谁的SRC属性分配一个PDF文件的路径。我可以验证它在我的开发环境的所有作品,我甚测试用下面的加价:

I have a page with an iframe who's src attribute is assigned the path of a pdf file. I can verify it all works on my dev environment and I'm even testing this with the following mark-up:

<html>
<body>
<iframe src="hello.pdf" height="500px" width="500px"/>
</body>
</html>

这显示正常,但是当我将它移动到测试环境中它的调用下载对话框或冻结浏览器。

This displays fine, but as soon as I move it to the test environment it's invoking the download dialog OR freezing the browser.

我已经试过:

  • 我已经试过这与众多的PDF阅读器(包括非Adobe 读者)。
  • 在我想尽PDF阅读器配置设置,我可以看到这将是任何意义的。
  • 在我还调整了浏览器的安全设置。
  • I've tried this with numerous pdf readers (including non-Adobe readers).
  • I've tried every pdf reader configuration setting I can see that would be of any relevance.
  • I've also tweaked the security settings of the browsers.

推荐答案

我已经完成在我身边的一些测试,它完全使用的是PDF。对我来说,无论是与您的浏览器设置关于PDF文件(或应用程序/ PDF MIMETYPE等)的管理或无论是应用程序服务器设置关于处理PDF文件。

I have performed some test on my side and it is fully working with a PDF. For me it is either related to your browser setting regarding management of pdf file (or application/pdf mimetype etc..) or either to your application server setting regarding handling of pdf file.

这篇关于环境考虑在iframe中显示PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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