I am creating a html file using java program . HTML file is using CSS also . I am opening this file using javafx webview. Is it possible to send this html file to print command using java
I am doing this by opening the file in JEditorPane and then print the jeditorpane.
For Printing through JEditorPane ,I am using the following code.
try
{
File HtmlFile= new File("path of file");
JEditorPane htmlPane= new JEditorPane();
htmlPane.setPage(htmlFile.toString());
htmlPane.print();
}
catch(Exception ex)
{
ex.printStackTrace();
}