Introduction

The Visual C# .NET method of printing is anchored by the PrintDocument class. This class represents a connection between an application and a printer, and it abstracts all the specific printer functions into a single set of methods and properties. All the complexities and details of printing are hidden within this class. After you learn how to manage the PrintDocument class, you don't need to worry at all about the details of programming any particular printer.

The PrintDocument class raises an event for each page to be printed. You need to write code to handle this event, which supplies the actual text or graphics to be printed. If you recall the details of drawing graphics from Chapter 1, “Introducing Windows Forms,” you'll see ...

Get MCAD/MCSD.NET Training Guide (Exam 70-316): Developing and Implementing Windows®-Based Applications with Microsoft® Visual C#™ .NET and Microsoft® Visual Studio® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.