页面 <iframe id="iPrint" style='height:0; width:0;' ></iframe>
<input type="button" value="Print" οnclick="PrintPdf()"/>
<script type="text/javascript">
function PrintPdf() {
if (document.getElementById("iPrint").attachEvent) {
document.getElementById("iPrint").attachEvent("onload", function () { document.getElementById("iPrint").focus(); document.getElementById("iPrint").contentWindow.print(); });} else {
document.getElementById("iPrint").onload = function () {
document.getElementById("iPrint").focus(); document.getElementById("iPrint").contentWindow.print();
}
}
document.getElementById("iPrint").src = "./invSa.aspx?action=toPdf";
}
</script>
table模板aspx生成pdf可参考
http://blog.csdn.net/luan729/article/details/51818914
vs2010 asp.net
实例下载地址:http://218.95.37.10:8085/Html2pdf.rar
最后
以上就是受伤溪流最近收集整理的关于web生成pdf后的直接打印,隐藏iframe的全部内容,更多相关web生成pdf后内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复