0

Possible Duplicate:
How to capture the screen using JavaScript?

I want to take a snapshot of the screen on clicking on the save button .. does anyone know how can i press the PrtScn key of keyboard programmatically using jquery with php ..

Thanks in advance

Community
  • 1
  • 1
Nipun Tyagi
  • 878
  • 9
  • 26

1 Answers1

1

It would be a security hole to allow screen shots to be retrieved by any website, so that is definitely not going to be allowed. But even if you could force the browser to press Ctrl+PrtScn, it would be OS-specific and you still wouldn't have a way to retrieve the contents of the clipboard without the user's interaction.

There are <canvas> libraries that can help simulate what you want, but there isn't a way to retrieve pixel-for-pixel exactly what is open on the user's screen.

http://html2canvas.hertzen.com/

This script allows you to take "screenshots" of webpages or parts of it, directly on the users browser. The screenshot is based on the DOM and as such may not be 100% accurate to the real representation as it does not make an actual screenshot, but builds the screenshot based on the information available on the page.

jimp
  • 16,999
  • 3
  • 27
  • 36