There are of course many ways to print stuff, but I would go the PDF route. This has the added benefit, that you can easily view the documents online, in addition to getting nice looking printouts.

Other options would for example be to use TeX, or to generate PostScript directly, but unless you like things with a somewhat higher geek factor, generating PDF using one the CPAN modules will probably be easier... :)

For creating PDF from Perl I personally like PDF::API2, but there are other modules, too...

Update: Maybe you could tell a bit more about what features you need, in particular whether you want automatic layout of tables, paragraph wrapping, etc.  The above mentioned approach using PDF:API2 is rather low-level, i.e. you'd essentially have to make most layouting decisions yourself, like what column widths to use, how long a line of text can be to fit in the available space, and so on.

For many purposes this is okay, but if you're thinking of something more high-level, using a proper batch typesetting system would be the way to go. On the Perl side, this would involve writing out the desired content plus the proper markup. As there are many sophisticated templating systems for Perl, it is of course well-suited for this task.   I already mentioned TeX (typically used in combination with the macro package LaTeX). It is one of the oldest and probably the most well-known tool for the purpose (there also is a variant which directly generates PDF output). A more exotic, less well-known batch typesetter is Lout1 (which I was a big fan of some time ago, when I had to produce more documents than I have to now). Most of these approaches have a rather steep learning curve, though, but once you get the hang of it, those tools may help a lot to produce professionally looking output. Or, put differently, it's a matter of saving time now vs. saving time later. :)

BTW, my personal experience with creating nice looking printouts from HTML is, that it soon becomes quite a PITA, for anything non-trivial... (current browsers just aren't ready for prime time in this regard, IMHO) — but YMMV, and it ultimately depends on how 'nice' your printouts are supposed to be.

___

1  just in case anyone is interested... and 'cos it's somewhat hard to find: current version 3.36, also see here.


In reply to Re: Producing Nice Prints by almut
in thread Producing Nice Prints by Ben Win Lue

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.