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

Javafx WebView fails to render pdf.js

    Details

    • Subcomponent:
      web
    • Introduced In Version:
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        FULL PRODUCT VERSION :
        java version "1.8.0_131"
        Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
        Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [version 6.3.9600]

        A DESCRIPTION OF THE PROBLEM :
        Webview of javafx v1.8.0_131 isn't able to display demo page of pdf.js ("https://mozilla.github.io/pdf.js/web/viewer.html").

        This works in previous versions of java.

        REGRESSION. Last worked in version 8u112


        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        //import com.mohamnag.fxwebview_debugger.DevToolsDebuggerServer;

        import javafx.application.Application;
        import javafx.scene.Scene;
        import javafx.scene.web.WebEngine;
        import javafx.scene.web.WebView;
        import javafx.stage.Stage;

        public class WebView131Test extends Application
        {
        public static void main(String[] args)
        {
        launch(args);
        }

        @Override
        public void start(Stage primaryStage) throws Exception
        {
        WebView browser = new WebView();
        WebEngine webEngine = browser.getEngine();
        webEngine.setOnError(event -> System.err.println(event.getMessage()));
        webEngine.setOnAlert(event -> System.err.println(event.getData()));

        webEngine.setJavaScriptEnabled(true);
        webEngine.load("https://mozilla.github.io/pdf.js/web/viewer.html");

        Scene scene = new Scene(browser);
        primaryStage.setScene(scene);

        primaryStage.show();

        // try{
        // DevToolsDebuggerServer.startDebugServer(webEngine.impl_getDebugger(), 51742);
        // }
        // catch(Exception e){
        // e.printStackTrace();
        // }
        // primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>(){
        // @Override
        // public void handle(WindowEvent event){
        // try{
        // DevToolsDebuggerServer.stopDebugServer();
        // }
        // catch(Exception e){
        // e.printStackTrace();
        // }
        // }
        // });

        }

        }

        ---------- END SOURCE ----------

          Attachments

          1. MiniBrowser_Screenshot.png
            1.23 MB
            Murali Billa
          2. WebView131Test.java
            1 kB
            Priyanka Mangal

            Issue Links

              Activity

                People

                • Assignee:
                  arajkumar Arunprasad Rajkumar
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: