如何在C#.net中使用页眉和页脚打印文档 [英] how to print document with header and footer in C#.net

查看:369
本文介绍了如何在C#.net中使用页眉和页脚打印文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我想打印带有徽标页眉和页脚的文档,您可以在Web应用程序中发送指导线或摘要吗?

hello,
I want to print document with header and footer of logos , can u send guide lines or snippets in web application

推荐答案

script language=javascript>
function CallPrint(strid)
{
 var prtContent = document.getElementById(strid);
 var WinPrint =
window.open('''','''',''letf=0,top=0,width=1,height=1,toolbar=0,scrollbars=0,sta­tus=0'');
 WinPrint.document.write(prtContent.innerHTML);
 WinPrint.document.close();
 WinPrint.focus();
 WinPrint.print();
 WinPrint.close();
 prtContent.innerHTML=strOldOne;


}
<body>
<div id="divPrint">
//print all from this content
</div>
<asp:button ID="imgBtnPrint" onClick="javascript:CallPrint(''divPrint'');"
Runat="Server" /></div>
</body>


这篇关于如何在C#.net中使用页眉和页脚打印文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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