[OpenJDK 2D-Dev] Question about the relation of PrintService and PrinterJob

Patrick Reinhart patrick at reini.net
Tue Jul 19 21:39:01 UTC 2011


Hi there,

I have a question considering the relation between the "old" PrinterJob 
and the "new" PrintService:

Should the job settings (for example amount of copies or the job name) 
be held only within the PrinterJob and not be passed to the 
PrinterService as set by PrinterJob.setPrintService(PrintService)?

Here's a small szenario for my question:

The following code is beeing executed by the customer:

 > PrintService ps = xx //lookup thru 
PrintServiceLookup.lookupPrintServices() method
 > PrinterJob pj = PrinterJob.getPrinterJob();
 > pj.setPrinterService(ps);
 > pj.setCopies(2);
 > pj.setJobName("theTestJob");
 > pj.print();

When the print() method is called, the following methods where called on 
the PrintService returned by the lookup:

 > ps.createDocPrintJob()

and finally on the DocPrintJob:

 > dpj.print(Doc, PrintJRequestAttributeSet)

Now: Why does the print request attribute set not contain the Copies 
attribute? Is this not intended or a bug?

Thanks for some more explanation, I would like to help as soon I 
understand the correct behavior..

Regards

Patrick


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4487 bytes
Desc: S/MIME Kryptografische Unterschrift
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20110719/7996d8da/smime.p7s>


More information about the 2d-dev mailing list