Printing Module
Overview
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.
Setup
In your module you must indicate that the printing module is required. In config.xml put:
<require_modules>
<require_module>org.openmrs.module.printing</require_module>
</require_modules>
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
Developers
?@Ben Wolfe