• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Printer trays

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there,

I am looking for a Java solution that will enable me to have control over the printer tray to which my application prints. Thanks.

Cheers,
Jack
 
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look in the packages javax.print and javax.print.attribute. Perhaps the class javax.print.attribute.standard.MediaTray can help you here. It does not let you specify a tray per se, but rather a tray that contains a particular type of media (e.g. A4 paper).
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have the same problem.. i tried selecting a tray from a printer...

using MediaTray .. was not able to do so.. the print was from a

default tray only...

this was the code i used...

PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(MediaSizeName.ISO_A4);
aset.add(MediaTray.MANUAL);


PrintService[] pservices = PrintServiceLookup.lookupPrintServices(
flavor, aset);


atlast i load the PDF and prnt the document.... but i was not able to
print it in the defined Media Tray.. it was from default tray..always..

can somebody help me out with this prob....
 
Ganapathy Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi EveryBody,

No body there to help me out with this problem....

still hoping some body could help me
 
reply
    Bookmark Topic Watch Topic
  • New Topic