Source code can be printed with coloured syntax highlighting by using enscript. For example. a postscript file can be created from a C++ source file:
$ enscript -E --color -o <TARGET_FILENAME> <SOURCE_FILENAME>
More information can be found on the Linux man page.