开发者

How to get port name of printer?

开发者 https://www.devze.com 2022-12-17 02:34 出处:网络
I use javax.print.PrintService to look up printer services on local machine. Here is code to get printers:

I use javax.print.PrintService to look up printer services on local machine. Here is code to get printers:

PrintService[] services = PrintServiceLookup.lookupPrintServices(DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);

Can i al开发者_JS百科so get port name of printer (USB001, COM, LPT..) in java?


You just can't do it with pure Java code (i.e., without using JNI (native code)).

0

精彩评论

暂无评论...
验证码 换一张
取 消