Hi,

Can someone advise me how can I ensure that below code look for the client PC default printer not the server's one where the application is runing?
right now below code runs fine on my local system but when this code runs in server "printService" returns null.

// First identify the default print service on the system
PrintService printService = PrintServiceLookup.lookupDefaultPrintService();

// prepare the print job
DocPrintJob printJob = printService.createPrintJob();

// prepare the document, with default attributes, ready to print
Doc docToPrint = new SimpleDoc( out.toByteArray(), DocFlavor.BYTE_ARRAY.AUTOSENSE, null );

// now send the doc to print job, with no attributes to print
try {
printJob.print( docToPrint, null );
} catch (PrintException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}

Thanks, Dinesh.