Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295327

JavaFX - IllegalArgumentException when printing with margins equal to 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • jfx20
    • jfx19
    • javafx
    • b06

      At least on Windows, an IllegalArgumentException is thrown when printing with margins equal to 0.



      Caused by: java.lang.IllegalArgumentException: Margins must be >= 0
          at javafx.print.Printer.createPageLayout(Printer.java:359) ~[javafx-graphics-19.0.0-CZM-01-win.jar:?]
          at com.sun.prism.j2d.print.J2DPrinterJob.updatePageLayout(J2DPrinterJob.java:519) ~[javafx-graphics-19.0.0-CZM-01-win.jar:?]
          at com.sun.prism.j2d.print.J2DPrinterJob.updateSettingsFromDialog(J2DPrinterJob.java:600) ~[javafx-graphics-19.0.0-CZM-01-win.jar:?]
          at com.sun.prism.j2d.print.J2DPrinterJob.showPageDialog(J2DPrinterJob.java:296) ~[javafx-graphics-19.0.0-CZM-01-win.jar:?]
          at javafx.print.PrinterJob.showPageSetupDialog(PrinterJob.java:337) ~[javafx-graphics-19.0.0-CZM-01-win.jar:?]
          at com.zeiss.forum.viewer.feature.actions.print.pdf.ImagePrintFx.print(ImagePrintFx.java:122) ~[classes/:?]
          ... 62 more

            prr Philip Race
            fkirmaier Florian Kirmaier
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: