PDF creation?

Peter Corlett abuse at cabal.org.uk
Mon Apr 22 11:28:07 BST 2013

On Sun, Apr 21, 2013 at 07:43:11AM -0400, Mark Fowler wrote:
> In a few weeks I'm going to want to be creating PDFs from Perl, something I
> haven't done in a few years. What's the recommended approach these days?

My *favourite* approach, which is almost certainly not the consensus answer, is
to generate a LaTeX document (e.g. using Template.pm) and then run that through
xelatex to generate a PDF. This does however require you to learn how to drive
LaTeX and how to trawl CTAN etc for useful packages.

(FWIW, pretty much all of the useful LaTeX packages are already in Debian.)

> I know I'm going to want to create the document from scratch, not fill in a
> template, and I'm probably going to want multi-line text and basic drawing (a
> horizontal line or two)

The "template" in this case would be the LaTeX preamble that pulls in and
configures all of the packages you use in your document. You get multi-line
text, tables, page reflowing and all sorts of other goodies for free.

More information about the london.pm mailing list