how to use PrinterStateReason in Java?

2019-08-26 12:06发布

Need a help. I don't know how to use PrinterStateReason to giving printer. we can call PrinterStateReason in this way

PrinterStateReason pr =PrinterStateReason.OUTPUT_AREA_FULL;

but I want to check the state of a giving printer is it possible with PrinterStateReason?

example :

PrintService[] pservices =PrintServiceLookup.lookupPrintServices(null, null);
log.info("Printer Attrbute"+ pservices .getAttributes().toArray());

this will list down all print which are available in the giving network. I don't know how to use PrinterStateReason in the same way?

标签: java
0条回答
登录 后发表回答