[pgh-pm] [Fwd: Re: PDF Generation from HTML]

Daniel J. Wright Dan at DWright.Org
Mon Dec 19 10:51:50 PST 2005


Sorry, forgot to CC the list.

Anybody else find it annoying when mailing lists fail to set a reply-to
back to the list?

---------------------------- Original Message ----------------------------
Subject: Re: [pgh-pm] PDF Generation from HTML
From:    "Daniel J. Wright" <Dan at DWright.Org>
Date:    Mon, December 19, 2005 1:50 pm
To:      "brian janaszek" <bmj at anklebiter.net>
--------------------------------------------------------------------------


I'm doing something like that here:

  https://www.pairnic.com/serviceagree.m

The "dowload pdf version" link generates a pdf copy of the page
dynamically whenever you click on it.  This ensures that we don't make a
change to the HTML version and forget to update PDF at the same time.

Whenever I was researching this, I really couldn't find any good Perl
modules that do this sort of thing.  :(    The problem with the things
that I fould were that they wanted translate the HTML into some sort of
image format and then stick that image into the pdf document.   This led
to a lossy conversion.

I eventually settled on a non-perl solution.  It was a two-step process:

1) Run html2ps:

  http://user.it.uu.se/~jan/html2ps.html

2) Run ps2pdf:

  http://www.cs.wisc.edu/~ghost/doc/AFPL/6.50/Ps2pdf.htm


Looking through google now, I see there is also a "html2pdf"

  http://directory.fsf.org/print/misc/html2pdf.html

I'm not sure if I ever tried that or not.

Regards,
-Dan

> Hello...
>
> I've been a longtime lurker, and now I'd like to solicit some opinions.
> Here's the problem...
>
> I've signed on to help an online journal generate PDF versions of their
> articles.  The journal uses a hacked up version of Movable Type for
> content management.  I've implemented a so-so solution with PHP and the
> FPDF library (www.fpdf.org), but it doesn't handle Unicode very well
> (and there's a possibility that articles could contain non-English
> characters), and it can only handle rudimentary HTML layouts.  I've done
> some PDF generation work with PDFLib, but unfortunately, that is not
> option due to the cost.  My sense is that something better exists in the
> Perl universe thanks to better Unicode handling.
>
> I've seen a few promising modules on CPAN, and I'm curious if anyone has
> used any of them and had any luck with them.
>
> Thanks!
> brian
> _______________________________________________
> pgh-pm mailing list
> pgh-pm at pm.org
> http://mail.pm.org/mailman/listinfo/pgh-pm
>




More information about the pgh-pm mailing list