Chapter 17. Printing

Although some programs never need to produce "hard" output, printing is an important part of many applications. Printing lets you produce a permanent physical record of your work. It lets you make reports to give to your boss, pamphlets and newsletters to give to your neighbors, and doodles to stick on your refrigerator.

WPF provides some remarkably powerful printing capabilities. One of the most impressive of these is the ability to produce transformed output with little or no loss of resolution. Because WPF's retained-mode graphics strategy uses objects to represent graphical output, those objects can generate output even after they are transformed. That means a printout can display even a small piece of output zoomed to a large scale but still at a high resolution.

Figure 17-1 shows two printouts of the same window at different scales. The one on the left shows the window at its normal scale. The one on the right shows the window greatly enlarged.

It's hard to tell in Figure 17-1, but both printouts display smooth curves and lines even though the one on the right is enlarged. If the one on the right were enlarged even further, perhaps to the point where the word New in the title area filled the entire page, it would show smooth ...

Get WPF Programmer's Reference: Windows Presentation Foundation with C# 2010 and .NET 4 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.