I am developing a Spring MVC application - Angularjs.
I need to print reports, I chose JasperReport for this.
Before continuing, I want to know if I can create a report and then print it on the default printer installed on the client computer (a printer that can change according to users) without displaying it on the screen.
I was looking for answers to this particular need, but could not find.
If anyone knows about this ....
Source for report generation and printing:
HashMap<String, Object> params = new HashMap<String, Object>();
params.put("Title", "My Report");
InputStream reportStream = this.getClass().getResourceAsStream(TEMPLATE);
JasperDesign jd = JRXmlLoader.load(reportStream);
JasperReport jr = JasperCompileManager.compileReport(jd);
JasperPrint jp = JasperFillManager.fillReport(jr, params, datasource.getDataSource());
JasperPrintManager.printReport(jp, false);