3

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?

4 Answers 4

3

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

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

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.

Comments

0

Tetex with listings package will do. Best option if you create PDF with *tex.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.