我们有一个以PDF格式显示报告的web应用程序。我们只需将PDF嵌入到iframe中,一切工作正常。
然而,当在Safari6.0中打开相同的报表时,它不会显示小工具栏(指定下载、打开预览、放大、缩小选项)。
如果我右击-->在新选项卡中打开PDF -->转到页面底部-->悬停到页面中间,这个工具栏在safari 6.0中可用。
Safari6.0中使用的PDF查看器是"Webkit内置PDF“。
我的问题是,为什么当我在单独的选项卡中打开PDF文档而不是从我的应用程序中打开PDF文档时,工具栏会出现(即当它嵌入到IFRAME中时)。
更多信息:这是IE 8中源元素的外观:
<iframe width="100%" height="100%" id="iframeReport" src="http://localhost/Report.aspx?DailySummary&PROCESSINGDATE=03%2f07%2f2013&rc%3aParameters=Collapsed&rc%3aJavaScript=False&rc%3aToolbar=True&rs%3aFormat=PDF&rc%3aArea=Report&rc%3aLinkTarget=_self&File=test.pdf" style="width: 100%; height: 100%;"/>下面是源代码在Safari中的样子:
<iframe id="iframeReport" height="100%" width="100%" style="height: 100%; width: 100%;" src="http://localhost/Reports.aspx?DailySummary&PROCESSINGDATE=03%2f07%2f2013&rc%3aParameters=Collapsed&rc%3aJavaScript=False&rc%3aToolbar=True&rs%3aFormat=PDF&rc%3aArea=Report&rc%3aLinkTarget=_self&File=test.pdf">
#document
<html>
<body marginwidth="0" marginheight="0" style="background-color: rgb(38,38,38)"><embed width="100%" height="100%" name="plugin" src="http://localhost/Reports.aspx?DailySummary&PROCESSINGDATE=03%2f07%2f2013&rc%3aParameters=Collapsed&rc%3aJavaScript=False&rc%3aToolbar=True&rs%3aFormat=PDF&rc%3aArea=Report&rc%3aLinkTarget=_self&File=test.pdf" type="application/pdf">
</body>
</html>
</iframe>发布于 2013-04-12 01:11:57
这是Safari中的一个漏洞,我一年前就向苹果报告过这个问题,他们已经意识到了。
https://stackoverflow.com/questions/15493474
复制相似问题