GNU Enscript takes ASCII files (often source code) and converts them to PostScript, HTML or RTF. It can store generated output to a file or send it directly to the printer.
It is often used for its syntax highlighting, as it comes with rules for a wide range of programming languages. New rules can be added using an awk-like stateful scripting language.