Click here to Skip to main content
15,887,832 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have printer with two trays,
by default i am printing on tray 1, i want to check if tray 1 is empty,then print on tray 2.

Please help...
thank you
Posted
Updated 15-Aug-13 7:12am
v2
Comments
ZurdoDev 15-Aug-13 13:14pm    
You'll have to look at the driver details.
ridoy 15-Aug-13 14:43pm    
Check http://stackoverflow.com/questions/8943312/changing-printer-trays-during-print-job

1 solution

This is normally done by the printer itself, not your code.

When you print something, the job is queued up in a spooler. If there are a bunch of jobs in the queue when your job prints, your job may have been started when there was paper in the tray and when your job finally prints, it may be empty. The opposite may also be true.

Also, what if the printer runs out of paper half way through your job?? Then what??

Basically, you're wasting your time trying to do this as you cannot determine the state of the printer when the job starts and you cannot change the job in the middle of it printing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900