Unable to chose a specific Tray in Java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jaisankar_alagappan
Posted On:   Sunday, December 14, 2008 11:27 PM

I am using IBM InfoPrint 5712(Postscript printer) and it has 4 trays such as Tray 1, 2,3,4. My requirement is to send file A.PDF to Tray 1 file B.PDF to Tray 2 file C.PDF to Tray 3 file D.PDF to TRay 4. I am using the Java Print Service API to do this. I have tried serveral approaches. Nothing seems to be working. Following are the code snippets. -------------------------------------------- PrintRequestAttributeSet printSet = new HashPrintRequestAttributeSet(); printSet.add(MediaTray.MAIN); //printSet.add(MediaTray.TOP); //printSet.add(MediaTray.MANUAL); D   More>>

I am using IBM InfoPrint 5712(Postscript printer) and it has 4 trays such as Tray 1, 2,3,4.

My requirement is to send

file A.PDF to Tray 1

file B.PDF to Tray 2

file C.PDF to Tray 3

file D.PDF to TRay 4.


I am using the Java Print Service API to do this.


I have tried serveral approaches. Nothing seems to be working.


Following are the code snippets.

--------------------------------------------

PrintRequestAttributeSet printSet = new HashPrintRequestAttributeSet();

printSet.add(MediaTray.MAIN);

//printSet.add(MediaTray.TOP);

//printSet.add(MediaTray.MANUAL);

DocPrintJob pJob = services[2].createPrintJob();

DocFlavor flavor3 = DocFlavor.URL.AUTOSENSE;

SimpleDoc simpleDoc3 = new SimpleDoc(pdfFile.toURI().toURL(), flavor3, null);

pJob.print(simpleDoc3, printSet);


----------------------------------------

Have any one come across this issue? Please suggest.


Thanks

   <<Less
About | Sitemap | Contact