I have to print the whole sourcecode of a java-project. The final version should look like: Eclipse: File -> Print. But with this function you can only print on
http://sourceforge.net/projects/javasrc2pdf/?source=typ_redirect
This creates all the PDFs and with reasonably good syntax highlighting however they are all in separate files. But there are plenty of ways to combine pdfs out there
If you want the formatting exactly as it is in Eclipse, then you will probably have to print from Eclipse. You'll spend more time trying to duplicate the print formatting that you have in Eclipse with another method.
Another important point: If you are using folding in the text editors in Eclipse, then the folded lines will not be displayed in the printed version.
If you really really have to furnish the source code as trees, then I would suggest that you try and persuade your clients that colour and syntax highlighting are not important, and then format everything in Eclipse, and print from elsewhere. There are suggestions for the line numbers etc in other answers.