in reply to HTML to PDF?

I've just tried out HTML::HTMLDoc and (the current version) doesn't support much in the way of CSS.

The problem is, of course, that in order to format a web page correctly for conversion to PDF, you have to build what amounts to a web browser. So my thoughts were, well, why not use Firefox to do that?

You'd think that would be easy, surely just a command line option that would use the existing code to print to a PDF, rather than launching a browser window. Naturally, I'm not the first person to think of that. However, this feature request, which is not the first, was opened in 2001, and seems to be well and truly stalled.

In that bug, they do mention gnome-web-photo, which I realise won't be of much use to you, as it is for Linux, but I tried it out, and it works rather well. It is available as a package on openSuSE at least, I presume on other Linux distributions as well.

It produces PS files, which are easy to convert to PDF docs with ps2pdf.

Replies are listed 'Best First'.
Re^2: HTML to PDF?
by QM (Parson) on May 05, 2007 at 15:58 UTC
    Thanks for your comments.

    The primary application is on Windows, though Unix and Linux are available remotely when needed. I'm trying to help a colleague, so I'll pass these ideas along.

    The Firefox idea is a good one. Perhaps someone in some remote corner of the Net has done something like this, and I just haven't searched thoroughly enough.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of