Thank you all for your comments on my post.

In my particular situation I wanted to create PDFs from data in a database, so editing the resulted PDFs is not an issue. The idea of creating rich text files though is a good one and I'll probably use it for other parts of the system.

The three main options seem to be produce PDFs directly from the code, produce .tex files and process them with LaTeX, or turn html inte PDFs using something like htmldoc.

I think that what I will do is produce PDFs by translating HTML. The logic for this is that I have to create the HTML anyway for when I display data on the web browser so it seems silly not to simply use the same layouts on the paper. If there is then a situation where doing this is innapropriate then churning out tex files seems a good bet - it very nicely separates the logic and the layout.

Finally I will produce PDFs directly from the code in only very rare situations, for example where I need the greatest control over where text or graphics appears on the page. This will be so specialised that t will be worth the effort of cooking up the code.

My situation is probably quite unique in that I need to produce may different types of paper output and so cannot invest too much time on each one. If I was just producing a single output, say a bill or a certificate then much more time could be justified.

Thank you again for all your input.


In reply to Re: Pretty output on paper - how best to do it? by EvdB
in thread Pretty output on paper - how best to do it? by EvdB

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.