mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Choosing "Print" option from the menu starts printing immediately before choosing printing preferences
This commit is contained in:
@@ -4419,6 +4419,10 @@
|
||||
<description>Upgraded JRE version of Mac builds to Themurin 17 and switched OpenGL to Metal rendering engine for improved performance</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Choosing "Print" option from the menu starts printing immediately before choosing printing preferences</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
</a>
|
||||
|
||||
@@ -874,13 +874,13 @@ public class ActionFactory {
|
||||
File tempPdf = Files.createTempFile("diylc", ".pdf").toFile();
|
||||
DrawingExporter.getInstance().exportPDF(PrintAction.this.drawingProvider, tempPdf);
|
||||
|
||||
PDDocument document = PDDocument.load(tempPdf);
|
||||
// PDDocument document = PDDocument.load(tempPdf);
|
||||
// PrintService printService = PrintServiceLookup.lookupDefaultPrintService();
|
||||
PrinterJob job = PrinterJob.getPrinterJob();
|
||||
PDFPageable pdfPageable = new PDFPageable(document);
|
||||
job.setPageable(pdfPageable);
|
||||
// PrinterJob job = PrinterJob.getPrinterJob();
|
||||
// PDFPageable pdfPageable = new PDFPageable(document);
|
||||
// job.setPageable(pdfPageable);
|
||||
// job.setPrintService(printService);
|
||||
job.print();
|
||||
// job.print();
|
||||
DrawingExporter.getInstance().print(PrintAction.this.drawingProvider);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user