I'm writing a C++ program in Visual Studio.NET. I have an 18" monitor so my resolution is set to 1280x1024, and I'm taking advantage of every inch of this space to do my coding (plus I comment a lot).

I'd like to print my documents out without every other line wrapping. Is there some way to set the default font for printouts to either smaller or something other than Courier New?

Dani AI

Generated

— printing source from old VS.NET often wraps lines because of the print font, margins and page layout. ’s suggestion to try a print-helper and ’s note that VS lets you control editor vs printer appearance are good starting points. If those don't produce the compact, non-wrapping output you need, try these practical alternatives.

Print to PDF first and tweak the layout there. Use any virtual PDF printer, open the PDF in a viewer and use the print dialog’s scaling (or “fit to printable area”), try landscape orientation and narrow margins, and preview at 70–90% scale until lines stop wrapping. This avoids wasting paper and shows exactly how the printer will render the text.

Use a code-aware formatter/exporter for tighter control. Tools like a2ps/enscript (available via Cygwin/GnuWin32 on Windows) can produce multi-column PostScript/PDF with small monospaced sizes. Alternatively, export the file as HTML/RTF (CopySourceAsHTML or NppExport in editors) and print from a browser or Word — those give finer page-margin and scaling controls while preserving syntax coloring.

Quick troubleshooting checklist: disable editor word-wrap before printing, check Print Preview, try turning off printed line numbers or gutter items that reduce usable width, reduce tab size or convert tabs to spaces, and test another printer driver or print-to-text to isolate driver vs editor behavior. If readability is acceptable at small sizes, choose a denser monospaced font (Lucida Console, or newer Consolas where available) to fit more code per line without changing layout.

Recommended Answers

All 2 Replies

What type of printer do you have? I once used the acutal software that came with my printer, and it had something similar to FinePrint Software App included. I use to use it all the time when I was in school for printing my code.

You could use fine Print. Great little software.

(In Visual Studio .NET)
But before you do that, have you tried to use the Options --> Text Editor --> All Languages and select word wrap? it may help...not sure.

I also select line #'s which is very useful when developing in .NET studio.

Sorry I couldn't help more

Is there some way to set the default font for printouts to either smaller or something other than Courier New?

Hi,

If you go to Tools menu -> Options dialog box, select 'Environment' and then 'Fonts and colours' from the list on the left. You can then choose font settings for text editor and printer separately in the list box titled "Choose settings for:".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.