import javaioFile;
import javaioFileInputStream;
import javaxprintDoc;
import javaxprintDocFlavor;
import javaxprintDocPrintJob;
import javaxprintPrintService;
import javaxprintPrintServiceLookup;
import javaxprintServiceUI;
import javaxprintSimpleDoc;
import javaxprintattributeDocAttributeSet;
import javaxprintattributeHashDocAttributeSet;
import javaxprintattributeHashPrintRequestAttributeSet;
import javaxswingJFileChooser;
public class Printers
{
public static void main(String[] args)
{
HashPrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
DocFlavor flavor = DocFlavorINPUT_STREAMAUTOSENSE;
//查找所有的可用的打印服务
PrintService[] printService = PrintServiceLookuplookupPrintServices(flavor, pras);
for (int i =0; i<printServicelength ;i++ )
{
Systemoutprintln(printService[i]getName());
}
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)