Convert html to image

I would like to take an html file, or even just an html string, and
convert it to an image (e.g. jpg or png). Unfortunately I have no idea
where to even begin. I imagine that it would involve the use of
rmagick, in fact I believe its possible to convert html to pdf and
then pdf to image, so I will start researching that angle.

Any help would be greatly appreciated, even a just a push in the right
direction would be great!

Thank you.

On Wed, 22 Oct 2008 02:39:20 +0200, cjokomay [email protected] wrote:

I would like to take an html file, or even just an html string, and
convert it to an image (e.g. jpg or png).

Shall the image show (possibly syntax highlighted) HTML source or
rendered
HTML and if the latter rendered using which engine? Please indicate the
operating systems(s) the software is to work on because the solution is
likely to depend on it.

Josef ‘Jupp’ Schugt

I would like to ask this too - is there a somewhat easy way to
“simulate” a user viewing a remote html page and have ruby capture the
resulting image, as if he were to look at it via browser, but without
any user interaction? (i.e. a “silent” ruby script to produce such
images)

On 23 oct, 15:02, Josef ‘Jupp’ Schugt [email protected] wrote:


Blog:http://penpen.goodaddress.eu/
PGP key (id 6CC6574F):http://wwwkeys.de.pgp.net/
Jabber -http://www.jabber.org/- contact information on request

Hi,

I would like to do smae thing. So, if I understand your answer, we
should first choose one html renderer: gecko, webkit, etc…

Is it correct ? Thanks !!

Regards,
José Luis

On Oct 21, 2008, at 6:39 PM, cjokomay wrote:

would like to take an html file, or even just an html string, and
convert it to an image (e.g. jpg or png). Unfortunately I have no idea
where to even begin. I imagine that it would involve the use of
rmagick, in fact I believe its possible to convert html to pdf and
then pdf to image, so I will start researching that angle.

Any help would be greatly appreciated, even a just a push in the right
direction would be great!

Thank you.

look at the image magick label functions, it’s possible that alone
will give you want you want: which is, i assume, to dump a text string
into an image.

a @ http://codeforpeople.com/

If you’re talking about web page thumbnails (not sure about the OP but
some of the follow-ups are), then you may be able to use this:

http://cutycapt.sourceforge.net/

– Mark.