如何检查打印机托盘是否为空C# [英] How to Check if Printer Tray is blank C#

查看:216
本文介绍了如何检查打印机托盘是否为空C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个托盘的打印机,

默认我在托盘1上打印,我想检查托盘1是否为空,然后在托盘2上打印。



请帮忙......

谢谢

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

推荐答案

这通常由打印机本身完成,不是你的代码。



打印时,作业在假脱机程序中排队。如果打印作业时队列中有大量作业,则当托盘中有纸张并且作业最终打印时,您的作业可能已启动,可能是空的。相反也可能是真的。



此外,如果打印机在工作中途耗尽纸张怎么办?那么什么??



基本上,你是在浪费时间尝试这样做,因为你无法在作业开始时确定打印机的状态而你无法改变在打印中间工作。
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.


这篇关于如何检查打印机托盘是否为空C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆