Re: How to Select different Printer for different document?
You can get an array of the visible printers via PrintServiceLookup. Then you can set the selected printer for the print job:
Code:
PrintService[] printServices=PrintServiceLookup.lookupPrintServices(null, null);
... // select print service
printJob.setPrintService(selectedPrintService);
If the code is running on the server and the printers are strictly local to the client (not visible to the server), I guess you'd have to let the client choose via their browser.
If you're not failing every now and again, it's a sign you're not doing anything very innovative...
W. Allen
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.
Bookmarks