1

Possible Duplicate:
Using HTML5/Canvas/Javascript to take screenshots

I am having 1 webpage in which I am getting some details from db in the form of table I want that page to be saved as an image so that that image I can mail it to the user.Can anybody help me out please

Community
  • 1
  • 1
user1761139
  • 11
  • 1
  • 2

4 Answers4

1

javascript in the webrowser for security reasons doesn't have the ability to do something low level like take a screenshot of the users screens. You can take a screenshot with something like selenium

Community
  • 1
  • 1
Marwan Alsabbagh
  • 25,364
  • 9
  • 55
  • 65
1

Marwan is right. Security issues prevent that for javascript. I would send a request to server with will generate the pic, and then send back the image. This of course increases the CPU & network usage of your server.

Community
  • 1
  • 1
Ramzi Khahil
  • 4,932
  • 4
  • 35
  • 69
1

You might want to look at HTML 2 Canvas which can render some parts of the DOM into a canvas. However, this might only work on in a browser allowing you to use canvas objects as they are part of the HTML5 specification.

Halim Qarroum
  • 13,985
  • 4
  • 46
  • 71
0

you can't do it with JS, generally can't make any screenshots.

Artem Oliynyk
  • 3,517
  • 1
  • 14
  • 11