打印到文件
/* nowjava.com - 时 代 Java */ import javax.print.PrintException; import javax.print.attribute.HashPrintRequestAttributeSet; import javax.print.attribute.PrintRequestAttributeSet; import javax.print.attribute.standard.Destination; public class Main { public static void main(String[] argv) throws Exception { try { // Set up destination attribute PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add(new Destination(new java.net.URI("file:e:/temp/out.ps")));