问题描述
如何从http://....url下载 pdf 文件并单击该文件打印?
我特别想要C#.net中的 print 代码.
How to down load a .pdf file from http://.....url and Print that file with in abutton click?
I want the print code in C# .net specially.
推荐答案
< input type ="button" value ="print" id ="btnPrint" runat ="server"önclick="javascript:CallPrint(" print)"/>
< script type ="text/javascript">
函数CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var WinPrint = window.open('''','''',''letf = 0,top = 0,width = 800,height = 800,toolbar = 0,scrollbars = 0,status = 0'');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>
<input type="button" value="print " id="btnPrint" runat="server" önclick="javascript:CallPrint(''print'')" />
<script type="text/javascript">
function CallPrint(strid)
{
var prtContent = document.getElementById(strid);
var WinPrint = window.open('''','''',''letf=0,top=0,width=800,height=800,toolbar=0,scrollbars=0,status=0'');
WinPrint.document.write(prtContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
</script>
这篇关于使用button_click在窗口表单应用程序中下载并打印.pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!