Convert div to image using html2canvas and save it using Ajax, PHP.

Sometime you need to convert your entire div to image.

Here i am going to use https://html2canvas.hertzen.com/.

1.For example i have HTML like below:

2.Now you have to include jquery and html2canvas.js.

You can also download html2canvas.js.

3.Now add below script to convert your entire div to image.

4.save_image.php

Full Code

save_image.php