Java Print Service Questions
I've a couple of questions regarding Java Print Service API.
1. I've tried to get the supported print service attributes from a print service. i can only get 4 or 5 attributes, not all of them. The printers were HPlaserjet 1000 and hp laserjet 1320N. my question is can we really get all attributes from a print service ? how can i achieve that ? do i need to change the printer for that or printer driver ?
2. Is there any list of supported drivers which can be discovered using printservice lookupservice ?
Thanks.
[544 byte] By [
yasirjeea] at [2007-10-1 23:59:54]

Hi,
I have written a code to Print a microsoft word doc, but this code is print Hashcode instead of the actual doc.
Here is my code. Please let me know which part of the code is creating problem.
code:
public String print() throws Exception {
String realPath = getRealPath("/images/formLibrary/csaAddressContactRequestForm100.doc");
PrintRequestAttributeSet pras1 = new HashPrintRequestAttributeSet();
DocFlavor flavor1 = DocFlavor.INPUT_STREAM.AUTOSENSE;
PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();
DocPrintJob job = defaultService.createPrintJob();
FileInputStream fis1 = new FileInputStream(realPath);
DocAttributeSet das = new HashDocAttributeSet();
Doc doc1 = new SimpleDoc(fis1, flavor1, das);
job.print(doc1, pras1);
Thread.sleep(10000);
System.exit(0);
return "";
}