[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

html 2 pdf

David Southwell

7/18/2007 2:56:00 PM

Hi

IIs there a gem for converting html to pdf?

I need to build a routine to step through a website and create a pdf from the
downloaded pages.

Thanks in advance

david Southwell


5 Answers

M. Edward (Ed) Borasky

7/18/2007 3:17:00 PM

0

David Southwell wrote:
> Hi
>
> IIs there a gem for converting html to pdf?
>
> I need to build a routine to step through a website and create a pdf from the
> downloaded pages.
>
> Thanks in advance
>
> david Southwell
>
>
>

If not, you could probably just shell out to the open source htmldoc
http://www.easysw.co.... There's a Perl interface you can learn
from, HTML-HTMLDoc
(http://search.cpan.org/~mkfrankl/HTML-HTM...). Or you could
build something out of "hpricot" and "pdf-writer".


Gregory Brown

7/18/2007 5:08:00 PM

0

On 7/18/07, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

> If not, you could probably just shell out to the open source htmldoc
> http://www.easysw.co.... There's a Perl interface you can learn
> from, HTML-HTMLDoc

This would probably work pretty good. I've done it before. A ruby
wrapper for this would be most appreciated, if anyone is looking for a
project!

> (http://search.cpan.org/~mkfrankl/HTML-HTM...). Or you could
> build something out of "hpricot" and "pdf-writer".

If you do this, I suggest using Ruport instead of PDF::Writer for your
PDF stuff. Of course, Ruport just wraps PDF::Writer, but it fixes
some bugs (thanks to Austin Ziegler) and adds some higher level
features and helps wrap the formatting code.

Some relevant docs if that's feasible for you:

http://rubyreports.org/cheatsheets/forma...
http://ruportbook.com/printable_docu...
http://ruportbook.com/integration.html#pdf_wr...
http://ruportbook.com/renderer_...

John Joyce

7/20/2007 4:19:00 PM

0


On Jul 18, 2007, at 10:17 AM, M. Edward (Ed) Borasky wrote:

> David Southwell wrote:
>> Hi
>>
>> IIs there a gem for converting html to pdf?
>>
>> I need to build a routine to step through a website and create a
>> pdf from the
>> downloaded pages.
>>
>> Thanks in advance
>>
>> david Southwell
>>
>>
>>
>
> If not, you could probably just shell out to the open source htmldoc
> http://www.easysw.co.... There's a Perl interface you can learn
> from, HTML-HTMLDoc
> (http://search.cpan.org/~mkfrankl/HTML-HTM...). Or you could
> build something out of "hpricot" and "pdf-writer".
>
>
No Good.
It doesn't even fully support HTML 4 !
And no support for stylesheets...?
There must be other alternatives.
OS X has built-in print to PDF (has had for many years) so there must
be GNU tool to do it.

Ryan Davis

7/20/2007 9:00:00 PM

0


On Jul 18, 2007, at 07:56 , David Southwell wrote:

> IIs there a gem for converting html to pdf?
>
> I need to build a routine to step through a website and create a
> pdf from the
> downloaded pages.

I have one that only works on OSX, but it works well. Lemme know if
you want it and I'll try to dig it up.



Tiffany Sonny

7/20/2007 9:03:00 PM

0

I want it:)

-----Original Message-----
From: Ryan Davis [mailto:ryand-ruby@zenspider.com]
Sent: Friday, July 20, 2007 2:00 PM
To: ruby-talk ML
Subject: Re: html 2 pdf


On Jul 18, 2007, at 07:56 , David Southwell wrote:

> IIs there a gem for converting html to pdf?
>
> I need to build a routine to step through a website and create a
> pdf from the
> downloaded pages.

I have one that only works on OSX, but it works well. Lemme know if
you want it and I'll try to dig it up.