Okay, so what you are looking for is a syntax highlighter. A google search will turn up dozens, but the one I use is called
Syntax, which is nice because it outputs HTML.
Notepad++ is another good choice, although I have not tried printing from it yet.