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

Webview default size is 800x600 - why ?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u5, 8u20
    • javafx
    • OS X Mavericks (but doesn't work on Windows 8 either)
      8u20 is build 14 and it has the same problem as 8u5

    • web

      The code below does not print the Label after the WebView. Usually (not always) when a WebView is rendered any further rendering to the printer ends up empty.

      If you comment out the WebView line and uncomment the first Label row then both labels will be printed.

         VBox box = new VBox();
         box.getChildren().add(new WebView());
      // box.getChildren().add(new Label("Uncomment this and comment WebView to make it work"));
         box.getChildren().add(new Label("Hello"));

         Printer pr = Printer.getDefaultPrinter();
         PrinterJob pj = PrinterJob.createPrinterJob(pr);
         pj.getJobSettings().setPageRanges(new PageRange(1, 1));
         pj.printPage(box);
         pj.endJob();

      The WebView is empty in the example but it's the same no matter what the content in it is.

            loneid Leonid Popov (Inactive)
            mgrev Mikael Grev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: