How do you print source code line numbers?

How are source code line numbers printed out to a printer? I can't seem to find a switch to turn that on either within Xcode, or within my printer's output config gui.

Replies

Perhaps this older thread will offer some guidance...


https://discussions.apple.com/thread/3082369?tstart=0

As far as I can tell Xcode doesn't print source code files with line numbers (although you can display them, via Xcode / Preferences / Text Editing / Line Numbers). Probably the easiest workaround is to open your source code files in another editor (such as the excellent and free TextWrangler) and print from there.

I also can't find a way to print line numbers from within Xcode. However, you can copy code from Xcode and it will retain it's formatting (coloring, etc). So, you can copy the code into another editor or Word Processor that can print line numbers (MS Word, for example), and print from there.