-
Bug
-
Resolution: Fixed
-
P4
-
1.4.2, 5.0
-
b92
-
x86
-
windows_xp
Name: rmT116609 Date: 03/10/2004
A DESCRIPTION OF THE PROBLEM :
DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
PrintRequestAttributeSet aset = new HashPrintRequestHashAttributeSet();
aset.add(MediaSizeName.ISO_A4);
PrintService[] pservices =
PrintServiceLookup.lookupPrintServices(flavor, aset);
if (pservices.length > 0) {
DocPrintJob pj = pservices[0].createPrintJob();
// InputStreamDoc is an implementation of the Doc interface //
Doc doc = new InputStreamDoc("test.ps", flavor);
try {
pj.print(doc, aset);
} catch (PrintException e) {
}
}
on line 2:
PrintRequestAttributeSet aset = new HashPrintRequestHashAttributeSet();
the object:
HashPrintRequestHashAttributeSet()
should be:
HashPrintRequestAttributeSet()
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
HashPrintRequestAttributeSet()
ACTUAL -
HashPrintRequestHashAttributeSet()
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/javax/print/PrintService.html
http://java.sun.com/j2se/1.5.0/docs/api/javax/print/PrintService.html
(Incident Review ID: 242851)
======================================================================
A DESCRIPTION OF THE PROBLEM :
DocFlavor flavor = DocFlavor.INPUT_STREAM.POSTSCRIPT;
PrintRequestAttributeSet aset = new HashPrintRequestHashAttributeSet();
aset.add(MediaSizeName.ISO_A4);
PrintService[] pservices =
PrintServiceLookup.lookupPrintServices(flavor, aset);
if (pservices.length > 0) {
DocPrintJob pj = pservices[0].createPrintJob();
// InputStreamDoc is an implementation of the Doc interface //
Doc doc = new InputStreamDoc("test.ps", flavor);
try {
pj.print(doc, aset);
} catch (PrintException e) {
}
}
on line 2:
PrintRequestAttributeSet aset = new HashPrintRequestHashAttributeSet();
the object:
HashPrintRequestHashAttributeSet()
should be:
HashPrintRequestAttributeSet()
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
HashPrintRequestAttributeSet()
ACTUAL -
HashPrintRequestHashAttributeSet()
URL OF FAULTY DOCUMENTATION :
http://java.sun.com/j2se/1.4.2/docs/api/javax/print/PrintService.html
http://java.sun.com/j2se/1.5.0/docs/api/javax/print/PrintService.html
(Incident Review ID: 242851)
======================================================================