[plug] creating single pdf files from multiple web pages

Gavin Chester sales at ecosolutions.com.au
Mon Dec 18 00:56:02 WST 2006


(This is just one for the archives.  I wanted to share my findings so
that bots would find the archived page and then others would be able to
have the info. too.  I had no luck searching for this for a couple of
years)

Keywords: Adobe Acrobat, pdf, html, website, local links, convert,
create, howto.

What am I on about?  In the bad old days up until a few years ago, I
used Win98 exclusively and forked out a few hundred dollars for Adobe
Acrobat (full version) to create single pdf files of websites, or linked
web pages, so that I could print the whole thing or archive for offline
reading.  This was particularly useful for multi-page howtos or
reference articles where it was just far too tedious to do a conversion
an html page at a time.  

I have searched off and on for a comparable way to do this in Linux with
GPL tools, but always came up short with massive workarounds needed and
none of the ease that Acrobat gave.  That is, until now.  The answer was
always there, I just hadn't found it :-)  

It only requires two tools that can be/are used from the command line:
"wget" and "htmldoc",  Most would know wget very well, but I only just
started experimenting with htmldoc.  For example, say I want to get a
multi-page howto and turn it into a pdf with relative internal links.  I
set wget to get it with an appropriate level of recursion and making
sure to get all page dependencies (to get the linked graphics that are
needed).  Then I tell htmldoc to turn the locally-saved html into a pdf.
Fantastic! wget does its magic and turns all the links into local
relative links and then htmldoc produces a pdf with the same active
links, just like Acrobat does.  Ya' gotta love GPL - I'm just kicking
myself for taking so long to come across this potent duo. Now I can just
script it a bit and do it even easier :-)  

BTW:  I know there are other uses for both apps, but what I describe
produces the result that _I_ have wanted for so long ;-)

Gavin          




More information about the plug mailing list