Printing Module


Simple printing API. The module currently only provides an API to call and a method of choosing the default printer for OpenMRS. No additional functionality is included.


In your module you must indicate that the printing module is required. In config.xml put:


Example Usage

Class printingServiceClass = getClass().getClassLoader().loadClass("org.openmrs.module.printing.PrintingService");
PrintingService printingService = (PrintingService)Context.getService(printingServiceClass);
ByteArrayOutputStream out = new ByteArrayOutputStream();

... write to 'out' ...

printingService.addPrintJob(out.toByteArray(), true /* interactive */ ));

interactive mode will pop up a java print dialog box that the user must click through to continue printing.


Download Module


?Ben Wolfe