How do I print source code?
For black and white printing you can use enscript - if it is available on your platform.
Go to Run > External Tools > External Tools Configurations… and follow the next steps:
Create a new Launch Configuration
enscript location (you can use
which enscript
command to get its path)enscript arguments
Apply > Run
The above enscript arguments (-2rT4v -DDuplex:true -dPhotosmart_C5100) used in this example mean: 2 = 2 columns on page,r = landscape, T4 = tab size 4, v = verbose, Photosmart_C5110 = a printer name
See also man enscript
(in a Unix/Linux console).
For color printing, you can copy/paste into Word / Open Office. The highlight is preserved. You can customize fonts / preview etc. in office tools.