121122123124125126127128129130131132133134135136137138
printerFound = true; } } } PDFPrinter printer = new PDFPrinter(document); if (silentPrint) { printer.silentPrint(printJob); } else { printer.print(printJob); } } finally { if (document != null)
135136137138139140141142143144145146147
{ try { if (document != null) { PDFPrinter printer = new PDFPrinter(document); PrinterJob job = PrinterJob.getPrinterJob(); job.setPageable(printer.getPageable()); if (job.printDialog()) { job.print(); } }