Printing colored C++ source code

Started by
6 comments, last by sordid 18 years, 10 months ago
Seems a strange and not appropriate question, but... Right now I figured out that I CAN'T print colored C++ source code on Visual C++ 6. During a Google session, I've found only a non-free tool that could solve my problem... Do you know how to do it, either using Visual C++ or another IDE? Thanks! PS.: Stupid question? Maybe. PS.: Sorry, not an English native.
Advertisement
You can't print in colour from any of the Visual Studios sadly.

ace
Quote:Original post by ace_lovegrove
You can't print in colour from any of the Visual Studios sadly.
ace

Ace, is there nothing else that could do the job?
I realize it's a bit lame, but it's how I did it for my classes.

I copied all the text (Ctrl-A in MSVC), and pasted into MS Word (works in OpenOffice too). It pastes w/ colour codes intact.

I only printed in B&W though, but considering it's colour in the Word document, it SHOULD print in colour too. I did it this way so I could modify the font size so I don't have 500 pages of code for a small app in C++...

Hopefully you can tell us (me?) whether this trick works or not.

[edit]
Judging from the reply below, it does work in 2002 (VC6). I used .NET, so it shouldn't be any different.
This works in MSVS 2002, don't know about other versions: You can just select the code you wish to print, copy it to Wordpad/Word/[your word processor], and it will keep the formatting (ie, font, size, and colour) with it. You can then print it out from there.

Failing that, if it's only a small amount of code, you could go to a paste site (ie, http://www.rafb.net/paste/, paste your code there, and print it out in colour from your browser.

Also, Whole Tomato Software's Visual Assist allows you to print from MSVS in colour. Get the free trial version perhaps.

Hope this helps.
Quote:Original post by sordid
I realize it's a bit lame, but it's how I did it for my classes.
I copied all the text (Ctrl-A in MSVC), and pasted into MS Word (works in OpenOffice too). It pastes w/ colour codes intact.
...
Hopefully you can tell us (me?) whether this trick works or not.

No, if didn't :) Already tried that trick (MS Visual C++ 6 -> MS Word 2003)

Quote:Judging from the reply below, it does work in 2002 (VC6). I used .NET, so it shouldn't be any different.

Sorry, Visual C++ 6 was shipped before 2002 (around 98).
Quote:Original post by mattd
Failing that, if it's only a small amount of code, you could go to a paste site (ie, http://www.rafb.net/paste/, paste your code there, and print it out in colour from your browser.

No, it's a huge amount of code :) Because that I don't want to spend my whole day frying my eyes reading code directly from my CRT monitor.

Quote:Also, Whole Tomato Software's Visual Assist allows you to print from MSVS in colour. Get the free trial version perhaps.

Hehehehe, that is the "non-free tool that could solve my problem...". Thanks anyway!

PS.: Well, now I'm beginning to believe I'm not that stupid, but some IDE developers are ;)
Well, it's an old IDE :P Probably didn't see a need for context-exact copying.

I just remembered that my buddy was using TextPad for his coding, and always came to class with colour printed source code from it.. TextPad does support C++'s keywords and such. (http://www.textpad.com/)

This topic is closed to new replies.

Advertisement