views:

191

answers:

6

Hi there. Just a dumb question... Is there any way you can create an image, say png, with the content of an html page, with a simple click of a button?

Thanks to anyone who cares to answers.

A: 

I believe this is what you are looking for:

http://code.google.com/p/wkhtmltopdf/

tambler
You might also look at:http://cutycapt.sourceforge.net/http://www.princexml.com/overview/http://khtml2png.sourceforge.net/
tambler
A: 

Thanks for you answers. But what I wanted was some code in javascript or python that would allow me to create an image from a table or div.

Vítor
A: 

If you're not locked to having it as a PNG, you could turn it into a PDF with Pisa/Report Lab (http://www.xhtml2pdf.com/). It handles tables pretty well.

stevejalim
A: 

There is a service called Webthumb at http://webthumb.bluga.net/home that I have used for something similar.

It has a fairly easy REST interface for you to work upon.

Rajat
+2  A: 

Here is code:

http://github.com/AdamN/python-webkit2png/

It requires webkit, xvfb (or X) and Qt4, and works best on Ubuntu.

Adam Nelson
A: 

There is a service with the name sitethumbshot.com. Its pretty good service and easy to integrate.

Hannah