寻求B/S的打印控件或者代码,越多越好 我是利用IE直接打印的,打印出来的内容有的部分串了,上面的内容串到了下面,事先说明,利用IE预览的时候也没问题,打印机没问题,就2台机器打印出来有问题,其他的机器没问题,所以我想多找些打印的方法或者第三方的打印控件,只要好用就给分 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 IE打印哪还有什么第三方控件啊,那你就不要用IE浏览,你自己写个浏览的程序,然后去打印吧 //打印. public static string print() { System.Text.StringBuilder html = new System.Text.StringBuilder(); html.Append("<object id='factory' style='display:none' viewastext classid='clsid:1663ed61-23eb-11d2-b92f-008048fdd814' codebase='http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360'></object>"); html.Append("<script defer='defer'>"); html.Append("factory.printing.header='';"); html.Append("factory.printing.footer='页码:&p/&P';"); html.Append("factory.printing.leftMargin =2;"); html.Append("factory.printing.topMargin = 2;"); html.Append("factory.printing.rightMargin =2;"); html.Append("factory.printing.bottomMargin =2;"); html.Append("</script>"); html.Append("<input type='button' name='bu1' value='打印设置' onClick='factory.printing.PageSetup()'>"); html.Append("<input type='button' name='bu2' value='打印预览' onClick='factory.printing.Preview()'>"); html.Append("<input type='button' name='bu3' value='打印' onClick='factory.printing.Print()'>"); html.Append("<input type='button' name='bu4' value='关闭' onClick='window.close()'>"); return html.ToString(); } IE中我记得有个什么属性,你把它加在分割页面的DIV中。在打印的时候会按照这个分割强行换新页面打的。 不需要打印的地方 设置class="noprint" 请问5楼的大哥:我的页面上既有单个的数据信息,又有GridView列表数据,能做成水晶报表吗 CSS样式分页参考:http://hi.baidu.com/angranguli/blog/item/1750eb19d918cb7ddab4bd6e.html 如果现在的IE打印已经基本满足了你的要求,就尽量不要在去找其他的方法了。否则对你可能要重新开发很多东西,前面有朋友提到了水晶报表,用水晶报表的话你的这些打印工作要重做一遍,要花很多时间而且可能打印的效果也不尽人意,特别是如果不是A4幅面的打印的话所以我建议还是多检查一下那两台机器跟别的正常机器有什么不同,比如说IE版本啊,是不是升级了什么补丁之类的又或者两台机器上装的打印驱动跟别的不一样? <style type="text/css" media="print">......</style>再不行就只能找第三方控件了。不过这东西要安装ActiveX更烦 那就试试第三方控件好了 FineReport支持Flash、pdf、applet三种精确打印的 谁有水晶报表的第三方控件啊? …………【VS2008到底都改了什么】………… C#中event关键字是怎么回事? 在线求高手,javascript脚本问题 OA系统构架 C#调用外部dll,大家帮看看那里出问题了 只有最后60分了,问一下C#问题。:(, 请大虾举个例子,用C#写一个供asp使用的组件例,只要实现两个字符串相加就好.请进. 如何自动授予无接触部署程序集的最大本地权限。 sql,在da.update时出错。请教原因。谢谢! 如何加datagird控件 C# 正则表达式 按字母定位combobox下拉表的问题
public static string print()
{
System.Text.StringBuilder html = new System.Text.StringBuilder();
html.Append("<object id='factory' style='display:none' viewastext classid='clsid:1663ed61-23eb-11d2-b92f-008048fdd814' codebase='http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360'></object>");
html.Append("<script defer='defer'>");
html.Append("factory.printing.header='';");
html.Append("factory.printing.footer='页码:&p/&P';");
html.Append("factory.printing.leftMargin =2;");
html.Append("factory.printing.topMargin = 2;");
html.Append("factory.printing.rightMargin =2;");
html.Append("factory.printing.bottomMargin =2;");
html.Append("</script>");
html.Append("<input type='button' name='bu1' value='打印设置' onClick='factory.printing.PageSetup()'>");
html.Append("<input type='button' name='bu2' value='打印预览' onClick='factory.printing.Preview()'>");
html.Append("<input type='button' name='bu3' value='打印' onClick='factory.printing.Print()'>");
html.Append("<input type='button' name='bu4' value='关闭' onClick='window.close()'>");
return html.ToString();
}
http://hi.baidu.com/angranguli/blog/item/1750eb19d918cb7ddab4bd6e.html
否则对你可能要重新开发很多东西,前面有朋友提到了水晶报表,用水晶报表的话你的这些打印工作要重做一遍,要花很多时间
而且可能打印的效果也不尽人意,特别是如果不是A4幅面的打印的话所以我建议还是多检查一下那两台机器跟别的正常机器有什么不同,
比如说IE版本啊,是不是升级了什么补丁之类的
又或者两台机器上装的打印驱动跟别的不一样?
......
</style>
再不行就只能找第三方控件了。不过这东西要安装ActiveX更烦