This is certainly technically possible.
You may have to map the HTML directly to the image file (or rather, to a bitmap image in memory that is written to the image file after it is completed).
I donβt know any libraries to do this for you (other than modified WebKit, perhaps) ... but there are certainly websites that do this.
Of course, this is a bit more involved than just opening a page in a browser on the machine and a screenshot programmatically, but the result is likely to be better if you do not care about the result from a particular browser.
Matthew iselin
source share