ADDITIONAL SYSTEM INFORMATION :
Linux Ubuntu 22.04, Java 17.0.7
A DESCRIPTION OF THE PROBLEM :
When creating a simple JavaFX application that just loads https://mozilla.github.io/pdf.js/web/viewer.html into a webview this loads, but on page 11 the graph has broken shadows. (Compare this to opening the viewer in e.g. Chrome), it's subtle but breaks for other pdfs that contain images also.
Older version of pdf.js seems to work, but even the newest version (on the demo page) works if you run it via Webkit browser (standalone). So somehow this must be related to webkit in webview. Unfortunatelly, no stacktrace or errors from webview are visible anywhere.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a simple JavaFX app with webview.
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
WebView webView = new WebView();
WebEngine engine = webView.getEngine();
engine.setJavaScriptEnabled(true);
String url = "https://mozilla.github.io/pdf.js/web/viewer.html";
engine.load(url);
primaryStage.setScene(new Scene(webView));
primaryStage.show();
}
}
Go to page 11.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
See bar graph with shadows.
ACTUAL -
Bar graph with shadows misaligned to bars.
---------- BEGIN SOURCE ----------
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
WebView webView = new WebView();
WebEngine engine = webView.getEngine();
engine.setJavaScriptEnabled(true);
String url = "https://mozilla.github.io/pdf.js/web/viewer.html";
engine.load(url);
primaryStage.setScene(new Scene(webView));
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Older versions of pdf.js (https://github.com/mozilla/pdf.js/releases/tag/v2.15.349) seems to be working in webview.
Linux Ubuntu 22.04, Java 17.0.7
A DESCRIPTION OF THE PROBLEM :
When creating a simple JavaFX application that just loads https://mozilla.github.io/pdf.js/web/viewer.html into a webview this loads, but on page 11 the graph has broken shadows. (Compare this to opening the viewer in e.g. Chrome), it's subtle but breaks for other pdfs that contain images also.
Older version of pdf.js seems to work, but even the newest version (on the demo page) works if you run it via Webkit browser (standalone). So somehow this must be related to webkit in webview. Unfortunatelly, no stacktrace or errors from webview are visible anywhere.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a simple JavaFX app with webview.
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
WebView webView = new WebView();
WebEngine engine = webView.getEngine();
engine.setJavaScriptEnabled(true);
String url = "https://mozilla.github.io/pdf.js/web/viewer.html";
engine.load(url);
primaryStage.setScene(new Scene(webView));
primaryStage.show();
}
}
Go to page 11.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
See bar graph with shadows.
ACTUAL -
Bar graph with shadows misaligned to bars.
---------- BEGIN SOURCE ----------
public class App extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
WebView webView = new WebView();
WebEngine engine = webView.getEngine();
engine.setJavaScriptEnabled(true);
String url = "https://mozilla.github.io/pdf.js/web/viewer.html";
engine.load(url);
primaryStage.setScene(new Scene(webView));
primaryStage.show();
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Older versions of pdf.js (https://github.com/mozilla/pdf.js/releases/tag/v2.15.349) seems to be working in webview.