Current Position:Home > Printing multiple copies in 1.3 and 1.4

Printing multiple copies in 1.3 and 1.4

Update:10-11Source: network consolidation
I have a problem while trying to print multiple copies of a doc programmatically (without the Print Dialog)with 1.3 and 1.4, but nobody seems to know an answer.
In 1.3 you can set the nr. of copies on the PrinterJob with the setCopies() Method. But this just doesn't work...
prints only one copy!
On the 1.4 you can use the PrintRequestAttributeSet to set the nr of copies, I tried this too, but it also doesn't work, I always receive just one copy (or the nr. of copies set in the Print Dialog...)
PrintRequestAttributeSet attset = new HashPrintRequestAttributeSet();
attset.add(new Copies(2));
This has to work somehow, nobody seems to miss it and it is part of the API. Is there some other trick that must be taken into account? The Bug List brings a few old errors, but under 1.4 there is no bug listed...
Thanks for helping me!

The Best Answer

Thanks a lot for helping me, this just wasn't my problem; but at least I'am meanwhile a little bit wiser:
the problem seems to be the printer: I can try here on 3 different printers (one of them is the ADOBE PDF, where I mostly do the testing).
The Printer 1 returns the SupportedAttributeValues for Copies 1-2000 and prints the 2 Copies wished ( works properly!)
The Printer 2 returns the SupportedAttributeValues for Copies 1-999 but doesn't print more than 1 copy (Any idea ??? )
The Printer 3 ( the ADOBE PDF one ) returns the SupportedAttributeValues for Copies.class 1 and prints allways only one copy, which at the first view seems to be right...(I already have tried to change the MultipleDocumentHandling to SINGLE_DOCUMENT.SINGLE_DOCUMENT_NEW_SHEET but that doesn't help!)
But I don't understand, why all the printers print 2 copies if I do it through the Print Dialog: when I increase the number of copies in the dialog, the specified number of copies is allways printed!!!
It is driving me crazy! I cannot properly implement the requirement to print 2 copies of a document, because there is no information from the printer that this won't do it ( see the printer 2!!!) The information about the printer that the java API returns, seems to be less than the printer really can!!!??? I hope, I am wrong...
So, if you have solved such problems, please let me know how!
Lot of thanks,