¿How to change the number of copies in printerJob?

Viewed 24

community help with the following problem that is driving me crazy: I am working printing a PDF file; In the print dialog showing

printjob.printDialog(),

enter image description here

the user selects the printer and also selects the number of copies that will be printed; what i am trying to do is reset the user selection wearing

printjob.setCopies(1)

after the print dialog box is displayed. when i consult getCopies() tells me to print a copy, but the printer prints the number of copies selected in the dialog box by the user, despite having changed it with setCopies(1). in this case 3 copies would come out. What can I do to make it take the setCopies(1) change?

PrinterJob job = PrinterJob.getPrinterJob();
if (job.printDialog()){
   job.setCopies(1);
   job.Print();
};
0 Answers
Related