--- title: "PrintDocument Component Overview" ms.date: "03/30/2017" f1_keywords: - "PrintDocument" helpviewer_keywords: - "PrintDocument component [Windows Forms], about PrintDocument component" - "printing [Windows Forms], PrintDocument component" ms.assetid: b59b4b60-dce5-42ca-8421-3a54a2f7bab0 --- # PrintDocument Component Overview (Windows Forms) The Windows Forms [PrintDocument](printdocument-component-windows-forms.md) component is used to set the properties that describe what to print and the ability to print the document within Windows-based applications. It can be used in conjunction with the [PrintDialog](printdialog-component-windows-forms.md) component to be in control of all aspects of document printing. ## Working with the PrintDocument Component Two of the main scenarios that involve the component are: - Simple print jobs, such as printing an individual text file. In such a case you would add the component to a Windows Form, then add programming logic that prints a file in the event handler. The programming logic should culminate with the method to print the document. This method sends a object, contained in the property of the class, to the printer. For an example that shows how to print a text document using the component, see [How to: Print a Multi-Page Text File in Windows Forms](../advanced/how-to-print-a-multi-page-text-file-in-windows-forms.md). - More complex print jobs, such as a situation where you will want to reuse printing logic you have written. In such a case you would derive a new component from the component and override (see [Overrides](/dotnet/visual-basic/language-reference/modifiers/overrides) for Visual Basic or [override](/dotnet/csharp/language-reference/keywords/override) for C#) the event. When it is added to a form, the component appears in the tray at the bottom of the Windows Forms Designer in Visual Studio. ## See also - - - [Windows Forms Print Support](../advanced/windows-forms-print-support.md) - [PrintDocument Component](printdocument-component-windows-forms.md)