title: Java HTML Rendering Engine
body: <p>I have a small HTML template using which i have to create an image. The HTML consists of text and formatting. The generated image is used by other services. It is similar to product price display in retail shops.</p>
  
  <p>Is there a Java library that can render <code>HTML</code> to an image file or byte array ? I saw <a href="http://lobobrowser.org/cobra.jsp" rel="noreferrer">Cobra</a> but it seems old.</p>
  
  <p>EDIT:
  Setting basic HTML to JLabel and using BufferedImage should work, but i'm not sure if the CSS and Style stuff will get properly handled.</p>
  
  <p>Sample Style</p>
  
  <blockquote>
    <p>&lt;styles&gt; width: &quot;240&quot;, height: &quot;96&quot;, background: { type: &quot;solid&quot;, color: &quot;#ffffff&quot; } &lt;/styles&gt;</p>
  </blockquote>