Is there a way to essentially take a screenshot of a specific section of a webpage when a button is pressed and save the image to my server? For example, when I press the button it saves a "screenshot" with all the content between top:100 top:800 left:200 left:700
Asked
Active
Viewed 159 times
1
-
possible duplicate of [Website screenshots using PHP](http://stackoverflow.com/questions/757675/website-screenshots-using-php) – mister martin May 01 '14 at 18:17
1 Answers
1
you can use a javascript library html2canvas that worked great for me in one of my projects. Here is a sample to use.
html2canvas(document.body, {
onrendered: function(canvas) {
/* canvas is the actual canvas element,
to append it to the page call for example
document.body.appendChild( canvas );
*/
}
});
A working demo here.
Good Luck with this one.

Guns
- 2,678
- 2
- 23
- 51
-
Worked perfectly ! Thanks, I changed the code a little so it fit what I needed to do but this worked fantastically! – sgrutman978 May 02 '14 at 14:16