I'm trying to learn Java Print Services (JPS). I can now enumerate
all the available printers and show their attributes in both Linux
and Windows, but one of these printers (a labeling printer attached
to a JetDirect box) is giving me fits. From Windows, I can print to
it, but under Linux, the same code prints to my default printer every
time. I'm doing like this here:
services = PrintServiceLookup.lookupPrintServices(null, null);
if (services != null) {
for (i = 0; i < services.length; i++) {
if (services[i].getName().equalsIgnoreCase("prtlabel_prodigy")) {
printSomething(services[i], Weyco.PRINTER_PRODIGY);
break;
}
}
}
and in printSomething():
job = service.createPrintJob();
job.addPrintJobListener(this);
job.print(doc, null);
Another strange thing is that I get two of each listener event in
Linux: printDataTransferCompleted(), printJobNoMoreEvents(), but
just one of each in Windows.
Does anybody have any suggestions?
--
____________________________________________________________
Glenn Holmer [EMAIL PROTECTED]
Programmer/Analyst phone: 414.908.1809
Weyco Group, Inc. fax: 414.908.1601
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]