This answers your problem.
You can use JavaScript/Canvas to do the job but it is still experimental.
Update:
There is a library for this now https://html2canvas.hertzen.com/
This answers your problem.
You can use JavaScript/Canvas to do the job but it is still experimental.
Update:
There is a library for this now https://html2canvas.hertzen.com/