Sign in to follow this  

Printing project source code

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This topic is 3459 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this