⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 e703. discovering available print services.txt

📁 这里面包含了一百多个JAVA源文件
💻 TXT
字号:
 // Look up all services
    PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);
    
    // Look up the default print service
    PrintService service = PrintServiceLookup.lookupDefaultPrintService();
    
    // Find all services that can support a particular
    // input format; in this case, a GIF
    services = PrintServiceLookup.lookupPrintServices(
        DocFlavor.INPUT_STREAM.GIF, null);
    
    // Find a particular service by name;
    // in this case "HP LaserJet 6MP PS"
    AttributeSet aset = new HashAttributeSet();
    aset.add(new PrinterName("HP LaserJet 6MP PS", null));
    services = PrintServiceLookup.lookupPrintServices(null, aset);
    
    // Find all services that support a set of print job capabilities;
    // in this case, color
    aset = new HashAttributeSet();
    aset.add(ColorSupported.SUPPORTED);
    services = PrintServiceLookup.lookupPrintServices(null, aset);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -