Output Java Source into pdf with Syntax Highlighting enabled
I开发者_如何学运维 wanted to know if there was a way, or a tool available, to output java source into a pdf that has syntax highlighting available?
GNU Enscript does what you want. It produces postscript files that can then be converted to PDF.
If your using eclipse there turns out to be a very nice print functionality where you could to have it output as a file using "Print to File", then specify the type as PDF, Postscript, or SVG.
Kate also allows you to print code with colour, so assuming you have some kind pdf printer software installed, it can print directly to pdf. It has customisable syntax highlighting for lots of different languages, including Java.
Tetex with listings
package will do. Best option if you create PDF with *tex.
精彩评论