PrinterJob printerJob = PrinterJob.createPrinterJob();
Printer printer = Printer.getDefaultPrinter();
PageLayout pageLayout = printer.createPageLayout(Paper.A4, PageOrientation.LANDSCAPE, Printer.MarginType.HARDWARE_MINIMUM);
Looks likeRT-37215 was not fixed properly.
In any case one should print which parameters fail. Also, the calling method, Printer.createPageLayout(), should check its values and never try to create a page with negative margins since it is making the calculations.
The error is for an Epson AcuLaser C9300N.
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Illegal parameters
at javafx.print.PageLayout.<init>(PageLayout.java:104)
at javafx.print.Printer.createPageLayout(Printer.java:307)
at wing.reports_new.print.Print.lambda$createPageSupplier$2(Print.java:332)
Printer printer = Printer.getDefaultPrinter();
PageLayout pageLayout = printer.createPageLayout(Paper.A4, PageOrientation.LANDSCAPE, Printer.MarginType.HARDWARE_MINIMUM);
Looks like
In any case one should print which parameters fail. Also, the calling method, Printer.createPageLayout(), should check its values and never try to create a page with negative margins since it is making the calculations.
The error is for an Epson AcuLaser C9300N.
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Illegal parameters
at javafx.print.PageLayout.<init>(PageLayout.java:104)
at javafx.print.Printer.createPageLayout(Printer.java:307)
at wing.reports_new.print.Print.lambda$createPageSupplier$2(Print.java:332)