1个回答
展开全部
import javax.print.DocFlavor;
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.attribute.PrintRequestAttributeSet;
public class PrintTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
DocFlavor flavor = DocFlavor.BYTE_ARRAY.PNG;
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
}
[Win32 Printer : Zan 黑白图像打印机,
Win32 Printer : Zan 彩色图像打印机,
Win32 Printer : Microsoft XPS Document Writer,
Win32 Printer : Fax,
Win32 Printer : \\192.168.30.127\HP LaserJet 1020,
Win32 Printer : \\192.168.31.68\Brother MFC-8220 USB Printer]
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.PrintService;
import javax.print.PrintServiceLookup;
import javax.print.attribute.PrintRequestAttributeSet;
public class PrintTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
DocFlavor flavor = DocFlavor.BYTE_ARRAY.PNG;
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
}
[Win32 Printer : Zan 黑白图像打印机,
Win32 Printer : Zan 彩色图像打印机,
Win32 Printer : Microsoft XPS Document Writer,
Win32 Printer : Fax,
Win32 Printer : \\192.168.30.127\HP LaserJet 1020,
Win32 Printer : \\192.168.31.68\Brother MFC-8220 USB Printer]
追问
这个数组我输出出来有3个
1,Win 32 printer :发送至 onenote 2007
2, win 32 printet :Microsoft XPS Document Writer
3,Win32 Printer : Fax
这些东西是什么意思?有比如缺纸,缺墨这些状态吗?
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询