I'm looking at the source code of PrintPDF, it has a "secret" option
"-printerName". Here's the code that is used:
PrinterJob printJob = PrinterJob.getPrinterJob();
printJob.setJobName(new File(pdfFile).getName());
if (printerName != null)
{
PrintService[] printService =
PrinterJob.lookupPrintServices();
boolean printerFound = false;
for (int i = 0; !printerFound && i <
printService.length; i++)
{
if (printService[i].getName().contains(printerName))
{
printJob.setPrintService(printService[i]);
printerFound = true;
}
}
}
printJob.setPageable(new PDFPageable(document));
if (silentPrint || printJob.printDialog())
{
printJob.print();
}
Note that this is for 2.0.2.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]