Illegal parameters when creating PageLayout

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 8u40
    • Component/s: javafx
    • Environment:

      OS X Yosemite 10.10.2

      java version "1.8.0_40"
      Java(TM) SE Runtime Environment (build 1.8.0_40-b25)
      Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

      PrinterJob printerJob = PrinterJob.createPrinterJob();
      Printer printer = Printer.getDefaultPrinter();
      PageLayout pageLayout = printer.createPageLayout(Paper.A4, PageOrientation.LANDSCAPE, Printer.MarginType.HARDWARE_MINIMUM);

      Looks like RT-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)

            Assignee:
            Philip Race
            Reporter:
            Mikael Grev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: