Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 714
Traker Avatar asked May 09 '26 23:05

Traker


2 Answers

GNU Enscript does what you want. It produces postscript files that can then be converted to PDF.

like image 78
Edward Dale Avatar answered May 12 '26 14:05

Edward Dale


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.

like image 24
Traker Avatar answered May 12 '26 12:05

Traker