简体   繁体   English

如何在 Java 中获取活动连接的打印机?

[英]How to get Active connected printers in Java?

I am a bit new in this topic.我对这个话题有点陌生。 Actually I want list of Printers which are connected to my PC currently in Java.实际上,我想要当前使用 Java 连接到我的 PC 的打印机列表。 I referred this link for solving my problem.我参考了这个链接来解决我的问题。 But the problem is, it is giving me all the printers whose drivers are installed in my PC (even if they are not connected right now).但问题是,它给了我所有驱动程序安装在我的 PC 上的打印机(即使它们现在没有连接)。

How can I get list of Printers which are connected currently?如何获取当前连接的打印机列表?

检查PrinterStateReason类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM