Pretty report printing

Quinn Dunkan quinn at pfennig.ugcs.caltech.edu
Fri Oct 27 00:18:28 EDT 2000


On Wed, 25 Oct 2000 15:08:36 +0100, Dale Strickland-Clark
<dale at out-think.NOSPAMco.uk> wrote:
>I need to produce a bunch of standard reports from a database and am
>considering Python.
>
>The reports need to be pretty but probably text only (although borders
>and boxes would be nice). They should be previewable online and
>printable to any Windows printer.
>
>I like the idea of using HTML but it doesn't understand the printed
>page so headings, headers and footers are trickey.
>
>Other options include PDF (which I'd have to research cos I know
>nothing about it) and driving Word or Excel through COM to build pages
>- which isn't an attractive thought.
>
>How have others tackled this problem?

I've written python scripts which generate LaTeX source.  It should be easy to
learn enough minimal LaTeX to produce the output and let it worry about table
formatting, headers, footers, etc.  Then you'd want to turn it in to
postscript with dvips.  If you expect the previewing will be done on windows
machines without ghostscript, I'm pretty sure I've seen some ps->pdf filters
about.

This is a pretty unixy solution but it was super easy for me and should be a
lot easier than generating pdf by hand :)  LaTeX is not a pretty beast but it
gets the job done and produces professional looking output.



More information about the Python-list mailing list