Crop (Get as Image) Visible Webpage Content by Javascript

Go To StackoverFlow.com

2

Suppose, I have a web page and it's showing in the web browser. Is it possible in Javascript to do the following:

  1. The whole visible webpage (without scrolling, just whatever is visible at a point), I draw an area on that using my mouse (either by drawing or by just selecting a two points as a rectangle).

  2. I click a submit button, and that visible area is converted as an image and saved to the server / client computer or whatever way, but I get the image.


I just want to know whether this is technically feasible, if yes, how ?

2012-04-04 19:52
by shamittomar


4

Yes, maybe you could try using jsFeedback? I know Google does this as well.

Also, http://html2canvas.hertzen.com/

2012-04-04 19:54
by Jordan
Google does this? Where? Please enlighten - shamittomar 2012-04-04 19:56
Sweet thing, didn't know about this one when I posted my answer :) However, only works on the DOM and I guess it will not render frames, iframes, canvas and maybe some other elements - jornare 2012-04-04 19:57
You can see it on Google+ feedback, and I think YouTube feedback - Jordan 2012-04-04 19:58
jsFeedback looks like a HTML5 thing - shamittomar 2012-04-04 19:59
I added a link to HTML2Canvas as well. It's also HTML5, but that's the youngest technology that supports this sort of thing - Jordan 2012-04-04 21:37


-1

For security reasons, No. If you're on an intranet or want to use it only privatly you may research into making a custom browser plugin that can do this for you.

2012-04-04 19:55
by jornare
No custom browser plugin. This has to work on public Internet - shamittomar 2012-04-04 19:57
Ads