Windows打印的一些常用知识
Windows打印
可以使用jdk中带有的java.awt.print包
常用方法:
获取打印机列表:
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
获取默认打印机:
PrintService printer = PrintServiceLookup.lookupDefaultPrintService();
如果想获取指定名称打印机,需要获取到所有的打印机列表,写一个for循环。建议
原创
2020-06-03 00:38:56 ·
949 阅读 ·
0 评论