Is there any choice for converting source code to pdf for reading?
I'm using Linux Mint and I'm looking for some command line solutions.
You can install a virtual printer like
If this is the only or the default printer in your system, then printing is as easy as:
If you're looking for nice formatted code here are the options:
Use this to convert source code file to html file which you can then print using the above command.
If you want a GUI solution, you can use SciTE editor, which can either print directly, convert to
Example usage, to typeset a file with 2-up layout and a fancy header in landscape mode, with C++ syntax highlighting: