2、 如果访问者的计算机上没有装acrobatreader,直接用iframe或者" />
在jsp页面上直接打开PDF文件 |
您所在的位置:网站首页 › freemarker下载服务器上的PDF文件 › 在jsp页面上直接打开PDF文件 |
1、在不需要使用插件,直接打开通过链接方式打开 DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2、 如果访问者的计算机上没有装acrobat reader,直接用iframe或者直接用链接打开,那就不是打开文档,而是直接下载了,为了防止下载,想像到媒体文件的播放方式,加上一些官方的docs,考虑用用object标签使用pdf插件嵌入ie中 Checking if Acrobat Reader installed (IE4+)... alt : Adobe Reader.pdf alt : Adobe Reader.pdf 低版本浏览器中的处理方法2:通过CSS控制显示隐藏 Html代码 /* hides the second object from all versions of IE */ * html object.hiddenObjectForIE { display: none; } /* display the second object only for IE5 Mac */ /* IE Mac /*//*/ * html object.hiddenObjectForIE { display: inline; } /**/ /* hides the second object from all versions of IE */ * html object.hiddenObjectForIE { display: none; } /* display the second object only for IE5 Mac */ /* IE Mac /*//*/ * html object.hiddenObjectForIE { display: inline; } /**/ Html代码 alt : test.pdf
以上文章转自: http://blog.csdn.net/xxyy888/article/details/7259819#comments
|
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |