Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printer selection of trays using java

pnvs gupta
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

As part of my program, I need to submit certain documents to one tray(with preprinted paper) and other documents to default tray.

I have used the following options with out luck.

1. Programmatically setting the printer by passing the following code in my attribute set

2. programmatically setting the printer by the following option

3. created a logical printer by disabling all the trays except "tray 2" in printer properties. In this scenario, if I print a pdf document using acrobat reader and selected my newly created logical printer, printer was printing on certified paper. The same is not possible through my java program

4. Created a custom size for tray 2 by adding 0.01 inches more to the letter size and defined the same in my java program as follows.

Any suggestions please!!!

My printer is HP LaserJet 9050 PCL 5e

Thanks in advance,
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic