3

Possible Duplicate:
Take a screenshot of a webpage with javascript?

I'm developing an interactive HTML page and am looking for a way to capture an arbitrary portion of this page into a dataURI (Base64 encoded PNG).

I know its possible to get this for a canvas element but do modern browsers provide any way to do this for an arbitrary section of the page?

Community
  • 1
  • 1
ohadpr
  • 977
  • 1
  • 8
  • 16
  • not even google can do it http://stackoverflow.com/questions/4912092/using-html5-canvas-javascript-to-take-screenshots :) – Josef Pfleger Jun 19 '11 at 07:52

1 Answers1

2

Not without sending it off server-side.

You could send an AJAX request to your server with some parameters (url, anchor, offset dimensions etc) and return a base64 string of the captured image.

Here's an example of capturing an image server-side using C#, there should be examples in other languages as well.

Marko
  • 71,361
  • 28
  • 124
  • 158