The display could be done with XHTML. The printed forms could be done
using LaTeX commands, but I imagine it would be painful to program. I
could learn postscript. I assume Acrobat's pdf is proprietary and
cannot be used. I have heard of an XML based page layout language, and
such a solution would lend itself to an XSLT transformation.
PDF is a published specification, there are several good perl and php libraries for working with it (I recall reading that Adobe is seeking standards approval for it, too). I'd recommend against PostScript, while it is fun (especially if you had an HP-48 calculator at some point) it's a pain if you want to get away from text and line art, not to mention worrying about what each individual printer (or driver) is going to do to your output.
Two other ideas would be GD and ImageMagick. Both generate an image and offer libraries for php and perl.
Sean