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.
Is there a Java library that can render HTML to an image file or byte array ? I saw Cobra but it seems old.
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.
Sample Style
<styles> width: "240", height: "96", background: { type: "solid", color: "#ffffff" } </styles>

JLabelorJEditorPane. BTW - "CSS and Style stuff" Unless you mean something completely different to what I understand by 'Style stuff', the two are one and the same.<styles>That element does not exist in any HTML specification I ever heard of. Did you copy/paste it or are you just making it up as you go along? But I don't want just the style, show a complete (valid) HTML as might be supplied for rendering.