Search code examples
javajavafxembedded-browser

How to support window.print() in a embedded web browser using JavaFx java 1.7


I have created an embedded browser using jdk1.7 (and bundled javafx with jdk 7). However a button on html page having onClick="window.print()" is not working.

Any idea how can this be fix.

Thanks and Regards, Rahul


Solution

  • As you note in your question, Java 7 will not work for printing WebView content as it lacks the required functionality to do so.

    Try Java 8, it adds printing support, though I don't know if printing of WebView content is supported when triggered through JavaScript.