如何访问打印机的状态?

问题描述:

我需要知道打印机状态。我需要使用Java程序控制打印机状态。
示例

I need to know the Printer Status. I need to control the Printer Status using Java Program. Example


  1. 检查打印机状态,天气是否接受作业,

  2. 缺纸

  3. 打印机队列

  4. 碳粉

  5. 等等。

  1. Check the Printer status, weather will it accept the Job or not,
  2. Out of Paper
  3. Printer queue
  4. Toner
  5. and etc..

我知道有办法检查基本信息,例如姓名,颜色是否支持。但我找不到任何检查纸张,碳粉,作业队列的例子。我想知道是否可以使用Java API。我找到了打印机功能的大API,但他们没有给出一个简单的例子如何使用它。

I know there is a way to check the basic information, such as name, color supported or not. But I can't find any example to check paper, toner, job queue. I like to know if it is possible to using Java API. I found big API for printer function, but they didn't give a simple example how to use it.

看看在此 PrinterStateReason 。还有 javax.print