Printing project source code

Started by
3 comments, last by Nebu 15 years, 9 months ago
I really didn't know where to post this, figured it'd be okay to post it here. Anyway I need to print my project source files for my project 'book' by tommarow, and I need a program that would be able to print all source files in my project with syntax,line numbers, to an editable file so I can add page numbers(otherwise, I'll just use a pen). My project is in VC8 and it seems I can only print files one by one and to pdf. I can't print files directly because my printer isn't working properly, so I need to print it somewhere else, thus I need it in a file. Can someone refer me to a good tool which allows this? Thanks.
Advertisement
By printing it to a pdf, you can get correct syntax colouring and indentation and line numbering on any computer, since the pdf will look the same on every computer you open it on (and decide to print it on).

Any good notepad these days can show your code the way you want it. On Linux, gedit will do what you want. On Windows, I used to use a program called Notepad++, which supported syntax highlighting, line numbers and more. Try that.

Whatever program you use, use it to print to pdf, and then print the pdf file on a computer that has access to a printer.
Quote:Original post by Nebu
I really didn't know where to post this, figured it'd be okay to post it here.
Anyway I need to print my project source files for my project 'book' by tommarow, and I need a program that would be able to print all source files in my project with syntax,line numbers, to an editable file so I can add page numbers(otherwise, I'll just use a pen).
My project is in VC8 and it seems I can only print files one by one and to pdf.
I can't print files directly because my printer isn't working properly, so I need to print it somewhere else, thus I need it in a file.

Can someone refer me to a good tool which allows this?
Thanks.


I couldn't find any program like what you want, but I figured out a hacky way of doing it if no one else can. Go to a paste site such as Nopate, paste your code there, copy/paste the webpage into Word (this part is tricky as the paste will be wider than the margins). If your code is very long it might not work so great either (perhaps break up the files into manageable chunks). Hope this helps.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

Quote:Original post by c4c0d3m0n
By printing it to a pdf, you can get correct syntax colouring and indentation and line numbering on any computer, since the pdf will look the same on every computer you open it on (and decide to print it on).

Any good notepad these days can show your code the way you want it. On Linux, gedit will do what you want. On Windows, I used to use a program called Notepad++, which supported syntax highlighting, line numbers and more. Try that.

Whatever program you use, use it to print to pdf, and then print the pdf file on a computer that has access to a printer.


It sounds like he wants
1)Line numbers (easy)
2)Syntax highlighting (easy)
3)the ability to add specific page numbers (not so easy, I think)

Basically it looks like he wants to embed source code into a final project report and have all the pages numbered correctly in the report.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

Thanks for the replies.
Is there no better way than doing it one by one? I have like 60 files,having pdf of each and printing them is going to be kind of a problem :S
Maybe theres a way to join pdfs?
Thanks anyways

This topic is closed to new replies.

Advertisement