Render HTML to an image

Martin Delille picture Martin Delille · May 23, 2012 · Viewed 318.3k times · Source

Is there a way to render html to image like PNG? I know that it is possible with canvas but I would like to render standard html element like div for example.

Answer

AKX picture AKX · May 23, 2012

Yes. HTML2Canvas exists to render HTML onto <canvas> (which you can then use as an image).

NOTE: There is a known issue, that this will not work with SVG