Printing

It was a bittersweet day when I learned that you can print to a file, using the Microsoft XPS Document Writer that appears in the list of installed printers in the Print dialog box. It was sweet because it made testing printing so much faster. But it was bitter because all my grand plans of buying a top-of-the-line color printer for my office became moot.

Printing Options

We all have to print at some point. So, when the time comes for you to print a file, it’s good to know what your options are in customizing how your printed pages look.

Tip 1.33: How to print line numbers

To print line numbers, go to File–Print, and on the lower left, you’ll see two options:

Sara Aside

Here’s a bonus tip, because I cannot bring myself to write a "Did you know ... how to hide collapsed regions when printing" tip. It makes me yawn. You can also hide collapsed regions. I’ve used this when I wanted to print out just my test case function and I didn’t want to print out any of the helper functions because they all lived in the same test case file.

Sara Aside

The preceding illustration, which I printed to an .xps file (no, I didn’t scan in a printed page), shows how the hidden collapsed regions will print out as ellipses.

Tip 1.34: How to print boldly

I think we all, at one point in time, have tried to customize our editor colors or change keywords to bold or something else, and then pressed the Print button. Yet, we arrive at the printer confused that our changes haven’t been applied.

To customize your fonts and colors for printing, go to Tools–Options–Environment–Fonts And Colors and change the selection in the Show Settings For drop-down list to Printer. Now you can customize your fonts and colors, including bold.

Tip 1.34: How to print boldly

Additionally, let’s say that you’ve already tweaked your colors or just want to use what you see in the editor. Then press the Use button and select Text Editor Settings. The default settings are restored to the original text editor defaults.

Tip 1.35: How to print the file path as the page header

Go to File–Page Setup. In the lower left corner, there’s a Page Header option:

Tip 1.35: How to print the file path as the page header

This option puts the file path across the top of the printed file.

Tip 1.35: How to print the file path as the page header
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.136.63