Convert div and content inside image

I have a DIV container that has some text, background image, image. I need to convert all the contents of a DIV to an image and save.

I was looking for him, but could not find the perfect answer. some of them give answers that use a windows application, but I need this on a web platform.

any help would be much appreciated

+3
source share
3 answers

From what I understood, you should do this on the client side, so you should take a look at the toDataURL method for the canvas.

If you do not know, text and image with canvas support

An example and a small library at this link: http://www.nihilogic.dk/labs/canvas2image/

+1

It is possible, with the code change here http://html2canvas.hertzen.com/screenshots.html you can do the required screenshot:)

0
source

All Articles