java打印 有谁用java做过打印发票的程序,感觉这方面不是很好控制,希望给点建议,最好能给出代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 简单点就调用window.print()你也可以把下面代码放到你JSP中:<html> <head> <title>M</title> <style type="text/css"> .table{ text-align:center; } </style> <style media="print"> .Noprint{display:none;} .PageNext{page-break-after: always;} </style> </head> <body> <center class="Noprint"> <p> <object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0" width="0"> </object> <input type="button" value="打印" onclick="document.all.WebBrowser.ExecWB(6,1)"> <input type="button" value="直接打印" onclick="document.all.WebBrowser.ExecWB(6,6)"> <input type="button" value="页面设置" onclick="document.all.WebBrowser.ExecWB(8,1)"> </p> <p> <input type="button" value="打印预览" onclick="document.all.WebBrowser.ExecWB(7,1)"></p> </center> aaaa </body></html> 谢谢yueweiac110但我说的不是在web程序中,而是客户端程序 url传递的参数中包含+号 EJB布署问题 我在用pdfBox 转化为图片的时候报这个错,是怎么回事啊? struts2 校验框架的提示信息怎么变成黑色了????? java通过Doc生成xml文件,并实现对xml文件内容的增、删 出入江湖 hibernate 的问题?急,在线等... Tomcat 5.0启动错误 很麻烦的问题,请各位struts高手来帮忙看看,分不够可以再加!!!! XML可不可能代替Java? 用struts的HTML写页面很麻烦,有没有好点的办法 struts2 spring2.5 hibernate3.2 整合问题
<html>
<head>
<title>M</title>
<style type="text/css">
.table{
text-align:center;
}
</style>
<style media="print">
.Noprint{display:none;}
.PageNext{page-break-after: always;}
</style>
</head>
<body>
<center class="Noprint">
<p>
<object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0"
width="0">
</object>
<input type="button" value="打印" onclick="document.all.WebBrowser.ExecWB(6,1)">
<input type="button" value="直接打印" onclick="document.all.WebBrowser.ExecWB(6,6)">
<input type="button" value="页面设置" onclick="document.all.WebBrowser.ExecWB(8,1)">
</p>
<p>
<input type="button" value="打印预览" onclick="document.all.WebBrowser.ExecWB(7,1)"></p>
</center>
aaaa
</body>
</html>
但我说的不是在web程序中,而是客户端程序