abdul_5 Posted January 10, 2020 Share Posted January 10, 2020 My Application using Jasper Reports to generate and print reports. Cash Drawer is connected to that POS Printer and that should be triggered on Print. Is there any settings I need to configure in Jasper Reports. Here is my Code sample which prints the bill.PrintRequestAttributeSet printRequestAttributeSet = new HashPrintRequestAttributeSet();printRequestAttributeSet.add(MediaSizeName.ISO_A4);PrintServiceAttributeSet printServiceAttributeSet = new HashPrintServiceAttributeSet();printServiceAttributeSet.add(new PrinterName(printerName, null));JRPrintServiceExporter exporter = new JRPrintServiceExporter();exporter.setExporterInput(new SimpleExporterInput(jasperPrint));SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration();configuration.setPrintRequestAttributeSet(printRequestAttributeSet);configuration.setPrintServiceAttributeSet(printServiceAttributeSet);configuration.setDisplayPageDialog(false);exporter.setConfiguration(configuration);exporter.exportReport(); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now