JRPrintServiceExporter explicitly sets the PrintService which should be used (code below).
However this way the default printer defined by the OS is completly ignored - the print dialog will simply always show the first printer returned by lookupPrintServices instead of the default printer.
// determining the print service only once
printService = (PrintService) parameters.get(JRPrintServiceExporterParameter.PRINT_SERVICE);
if (printService == null) {
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, printServiceAttributeSet);
if (services.length > 0)
{
printService = services[0];
}
}
Recommended Comments
There are no comments to display.