Skip to main content

Printing some doc in a only one print job

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2012-04-18

Hi, I'm new on this forum.
I have a problem. I muss print many doc in a single Print job.
I have a PDF with some pages and for exemple:

  • - the page 1 is :
    • orientation : Portrait
    • single side
    • MediaTray.Top
  • - the page 2 - 5 is :
    • orientation : Paysage
    • dupley_long_edge side
    • MediaTray.Top
  • - the page 6 is :
    • orientation : Portrait
    • dupley_long_edge side
    • MediaTray.middle

I have a code how print with the good format but for this exemple I have 3 printJobs on my printer Queue.

I use this code :
private void print(Imprimante nImprimante, DocumentOCAS nDoc, PDFPrint nPDFPrint){
PrinterJob travailImpression = null;

travailImpression = PrinterJob.getPrinterJob();
try {

//impression du document en fonction des attributs de chaque pages ranges
for (FormatImpression unFormat : nDoc.getListeFormat()) {
setDocAttributes(nImprimante, nDoc, unFormat);
} catch (PrinterException e) {

I attache all my codes for this project.

If you want see more classes tell me.
If some body can help me, it will be great! Thanks

P.S: my english is not very good so if is not clear tell me :-)

org.zip131.52 KB