如何直接在jasper中打印 [英] How to print in jasper directly
本文介绍了如何直接在jasper中打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我必须将热敏打印机连接到我的Java应用程序。我想知道如何在没有打印管理器的情况下打印。我到目前为止
I have to hook up a thermal printer to my java app. I want to know how to print without print manager. I have come so far
JasperDesign jspDesign = JRXmlLoader.load(reportSource);
JasperReport jspReport = JasperCompileManager.compileReport(jspDesign);
JasperPrint jspPrint = JasperFillManager.fillReport(jspReport, params, datasource);
JRExporter exporter = new JRPrintServiceExporter();
JasperPrintManager.printReport(jspPrint, true);
我想剪切JasperPrintManager并点击按钮后打印。有谁知道怎么做?
I want to cut the "JasperPrintManager" and print after click the button. Anybody knows how to do this?
推荐答案
不确定我是否理解你的问题是正确的,但如果你写的话
Not really sure if i understand youre Problem correctly, but if you write
JasperPrintManager.printReport(jspPrint, false);
Jasper会将您的报告直接发送到系统中标准设置的打印机。
希望这可以帮到你。
Jasper will send your report directly to the printer which is set as standard in the system. Hope this helps you.
这篇关于如何直接在jasper中打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文