I have an HTML page that has Javascript code. It needs to be rendered first before it can be converted into an image.
I am aware of projects like wkhtmltoimage, PhantomJS, khtmltopng, webkit2png, PrinceXML and html2image. I have implemented a few of those but I am trying to find a pure Java solution that does not have to use Process to execute a command. Any help would be great, thanks!
edit: I looked into Cobra however it seems that the JS support is still in dev and it does not parse my html file properly.
Or if there are any other ways of doing this, please let me know. I am just trying to find the best solution possible.
I have found a solution using WebRenderer. WebRenderer is a paid solution and has a swing, server, and desktop edition. The swing edition is the only one that supports HTML5 as of 7/9/2012. However, the swing edition can be used on a server to convert the image by instantiating the browser and not creating a JFrame. See this question.