mrK*_*mrK 5 embed pdf internet-explorer pdf-viewer
我需要在HTML文档中嵌入PDF,可以在.Net应用程序中的IE8/9/10,firefox和chrome中查看.我需要远离第三方图书馆,因为我们需要满足发布日期,而且没有时间通过我们的法律部门推送新的许可证.我已经尝试了以下解决方案,但由于列出的原因,它们都没有工作.我不认为这应该很难,所以任何想法都是受欢迎的.
<object src='MyUrl.pdf' />
Run Code Online (Sandbox Code Playgroud)
对象标签不起作用,因为.Net中的对象标签需要一个类与它们相关联
<embed src='MyUrl.pdf' type='application/pdf' />
Run Code Online (Sandbox Code Playgroud)
嵌入式标签似乎在IE10中不起作用.没有显示任何内容,但缺少图像图标
<iframe src='MyUrl.pdf' style="z-index: 1; zoom: 1" />
Run Code Online (Sandbox Code Playgroud)
在IE10中,iframe的z-index无法控制,页面上的菜单会在框架后面下拉.
正如我所提到的,任何帮助都表示赞赏.
MrW*_*ter -1
这对我来说适用于大多数浏览器。
我在 IE 中仍然存在 z-index 问题,因为我有一个固定位置标题。
<object data="myurl.pdf" type="application/pdf" width="600px" height="500px">
<param name="wmode" value="transparent" />
<param name="allowFullScreen" value="true"></param>
<embed src="myurl.pdf"
type="application/pdf"
width="600px"
height="500px"
allowscriptaccess="always"
allowfullscreen="true"
wmode="transparent"
/>
</object>
Run Code Online (Sandbox Code Playgroud)