[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

convert html to image

cjokomay

10/22/2008 12:40:00 AM

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.
5 Answers

Josef 'Jupp' Schugt

10/23/2008 1:03:00 PM

0

On Wed, 22 Oct 2008 02:39:20 +0200, cjokomay <cjokomay@gmail.com> 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
--
Blog: http://penpen.gooda...
PGP key (id 6CC6574F): http://wwwkeys.d...
Jabber - http://www.j... - contact information on request

jlgonzalez208

10/24/2008 11:12:00 AM

0

On 23 oct, 15:02, Josef 'Jupp' Schugt <j...@gmx.de> wrote:
> On Wed, 22 Oct 2008 02:39:20 +0200, cjokomay <cjoko...@gmail.com> 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
> --
> Blog:http://penpen.gooda...
> PGP key (id 6CC6574F):http://wwwkeys.d...
> Jabber -http://www.ja... 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

Marc Heiler

10/24/2008 1:14:00 PM

0

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)
--
Posted via http://www.ruby-....

ara.t.howard

10/24/2008 5:05:00 PM

0


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://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama




Mark Thomas

10/27/2008 1:19:00 PM

0

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.source...

-- Mark.