记得上下班打卡 | git大法好,push需谨慎

Commit aed17656 authored by jiangxiulong's avatar jiangxiulong

test

parent b10bb235
...@@ -141,6 +141,10 @@ public class CodeUtil { ...@@ -141,6 +141,10 @@ public class CodeUtil {
} }
PrintService ps = PrintServiceLookup.lookupDefaultPrintService(); PrintService ps = PrintServiceLookup.lookupDefaultPrintService();
if (ps == null) {
System.out.println("ERROR-01: no default print service");
}
System.out.println("Printer: " + ps.getName());
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet(); PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
pras.add(OrientationRequested.PORTRAIT); pras.add(OrientationRequested.PORTRAIT);
...@@ -155,7 +159,6 @@ public class CodeUtil { ...@@ -155,7 +159,6 @@ public class CodeUtil {
Doc doc = new SimpleDoc(fin, dof, das); Doc doc = new SimpleDoc(fin, dof, das);
// ObservableSet<Printer> allPrinters = Printer.getAllPrinters();
logger.error("allPrinters", 111111); logger.error("allPrinters", 111111);
DocPrintJob job = ps.createPrintJob(); DocPrintJob job = ps.createPrintJob();
logger.error("allPrinters1", 2222222); logger.error("allPrinters1", 2222222);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment