title: print a html file using java or javafx
body: <p>I am creating a html file using java program . HTML file is using <code>CSS</code> 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 <code>JEditorPane</code> and then print the <code>jeditorpane</code>.</p>
  
  <p>For Printing through <code>JEditorPane</code> ,I am using the following code.</p>
  
  <pre><code> try
  
    {
  
      File HtmlFile= new File("path of file");
      JEditorPane htmlPane= new JEditorPane();
      htmlPane.setPage(htmlFile.toString());
      htmlPane.print();
     }
     catch(Exception ex)
     {
      ex.printStackTrace();
     }
  </code></pre>