Hi team,
Good Day.
I have a requirement , where in I have to convert an html file, having js, to image without rendering the html in the browser via JAVA. Basically like a screenshot from a static html page which has js.
Does aspose support any such functionality ??
I found this code in the aspose forum , but it gives image of static html without JavaScript
Document doc = new
Document(ImageConvert.class.getResourceAsStream("index.html"));
for (int page = 0; page < doc.getPageCount(); page++)
{
Document extractedPage = doc.extractPages(page, 1);
extractedPage.save(String.format("Output_%d.jpg", page + 1));
}
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}