0

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

rbhawsar
  • 805
  • 7
  • 25

1 Answers1

0

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.

jewelsea
  • 150,031
  • 14
  • 366
  • 406
  • will WebEngine.executeScript("window.print()"); work ? if somehow i can capture the window.print event in my embedded browser. – rbhawsar Jun 03 '14 at 07:36
  • As I said in my answer, it won't work in Java 7 and I don't know if it will work in Java 8, try it and you can post the definitive answer yourself. – jewelsea Jun 03 '14 at 08:00
  • I just tried, .executeScript("window.print()"); it doesn't work. You are right. – rbhawsar Jun 03 '14 at 08:15