I am working on a swing application using JAVA FX controls . In my application i have to take print out the html page displayed in the webview . What I am trying is to load the html content of webview in a string with the help of HtmlDocuement.
To load the content of html file from web view,I am using the following code but its not working:
try
{
String str=webview1.getEngine().getDocment().Body().outerHtml();
}
catch(Exception ex)
{
}
String html = (String) webEngine.executeScript("document.documentElement.outerHTML");