Website Screenshot (HTML5 Canvas / Services)

2.3k Views Asked by At

Alright all,

Been doing a bit of research and want to know if anyone else has tried this... and what approach would you take.

I'm planning on doing a website which will display a screenshot of a website (maybe based on the url in someones email address).

There's going to be alot of people getting this so, pre-production of the screenshots isn't a solution.

Soooooo... does anyone know of any solutions:

  1. Thumbnail service that builds on demand (no queuing)?
  2. HTML5/Canvas script that will let me do this. I've found one but it won't run cross site.
  3. Any other solution?

It'll be built in PHP.

Thanks

PVS.

4

There are 4 best solutions below

0
On

You can use html2canvas. More information here.

0
On

This site http://html2canvas.hertzen.com/ is the best you will get right now with regard to a client side script. It uses the calculated properties of elements to render a page, and I must say it looks good!

Update: A demo here: http://html2canvas.hertzen.com/tests/templates/projection/index.html . Click to toggle the 'real' view with the rendered image.

1
On

For taking screenshots of websites (one of the features) i built a service ontop of the awesome PhantomJS which is an excellent headless browser which uses the webkit engine (same that safari uses). Although it's headless, it still has deps in QT and a virtual framebuffer (xvfb). Hope this helps: http://www.phantomjs.org/

1
On

I've played about with wkhtmltoimage before, it was pretty good for what I was using it for, but does require you to install onto your server