My software engineering professor always used Code2HTML for the code samples he posted online:
http://www.palfrader.org/code2html/
While I never used it myself, it produced nicely formatted results.
http://www.palfrader.org/code2html/
While I never used it myself, it produced nicely formatted results.