# PrintDocument class

Namespace: [Eto.Forms](https://eto.picoe.ca/api/namespace/eto.forms.md) · Assembly: [Eto](https://eto.picoe.ca/api/assembly/eto.md)

```cs
[Handler(PrintDocument.IHandler)]
public class PrintDocument : Widget
```

Represents a document that can be printed

**Remarks:** A print document uses the [Graphics](https://eto.picoe.ca/api/type/eto.drawing.graphics.md) to render its output via the [PrintDocument.PrintPage](https://eto.picoe.ca/api/type/eto.forms.printdocument/printpage.md) event.

## Constructors

- [PrintDocument](https://eto.picoe.ca/api/type/eto.forms.printdocument/ctor.md): (2 overloads) Initializes a new instance of the PrintDocument class with custom drawn content only.

## Fields

- [PrintedEvent](https://eto.picoe.ca/api/type/eto.forms.printdocument/printedevent.md): (static) Identifier for handlers when attaching the [PrintDocument.Printed](https://eto.picoe.ca/api/type/eto.forms.printdocument/printed.md) event
- [PrintingEvent](https://eto.picoe.ca/api/type/eto.forms.printdocument/printingevent.md): (static) Identifier for handlers when attaching the [PrintDocument.Printing](https://eto.picoe.ca/api/type/eto.forms.printdocument/printing.md) event
- [PrintPageEvent](https://eto.picoe.ca/api/type/eto.forms.printdocument/printpageevent.md): (static) Identifier for handlers when attaching the [PrintDocument.PrintPage](https://eto.picoe.ca/api/type/eto.forms.printdocument/printpage.md) event

## Properties

- [Name](https://eto.picoe.ca/api/type/eto.forms.printdocument/name.md): Gets or sets the name of the document to show in the printer queue
- [PageCount](https://eto.picoe.ca/api/type/eto.forms.printdocument/pagecount.md): Gets or sets the total number of pages available to be printed in this document.
- [PrintSettings](https://eto.picoe.ca/api/type/eto.forms.printdocument/printsettings.md): Gets or sets the print settings for the document when printing.

## Methods

- [GetCallback](https://eto.picoe.ca/api/type/eto.forms.printdocument/getcallback.md): Gets an instance of an object used to perform callbacks to the widget from handler implementations
- [OnPrinted](https://eto.picoe.ca/api/type/eto.forms.printdocument/onprinted.md): Raises the [PrintDocument.Printed](https://eto.picoe.ca/api/type/eto.forms.printdocument/printed.md) event.
- [OnPrinting](https://eto.picoe.ca/api/type/eto.forms.printdocument/onprinting.md): Raises the [PrintDocument.Printing](https://eto.picoe.ca/api/type/eto.forms.printdocument/printing.md) event.
- [OnPrintPage](https://eto.picoe.ca/api/type/eto.forms.printdocument/onprintpage.md): Raises the [PrintDocument.PrintPage](https://eto.picoe.ca/api/type/eto.forms.printdocument/printpage.md) event.
- [Print](https://eto.picoe.ca/api/type/eto.forms.printdocument/print.md): Prints this document immediately using the current [PrintDocument.PrintSettings](https://eto.picoe.ca/api/type/eto.forms.printdocument/printsettings.md)

## Events

- [Printed](https://eto.picoe.ca/api/type/eto.forms.printdocument/printed.md): Occurs after the document has been printed
- [Printing](https://eto.picoe.ca/api/type/eto.forms.printdocument/printing.md): Occurs before printing has started
- [PrintPage](https://eto.picoe.ca/api/type/eto.forms.printdocument/printpage.md): Occurs for each printed page

## Inherited Members

- From [Widget](https://eto.picoe.ca/api/type/eto.widget.md): [ControlObject](https://eto.picoe.ca/api/type/eto.widget/controlobject.md), [Handler](https://eto.picoe.ca/api/type/eto.widget/handler.md), [ID](https://eto.picoe.ca/api/type/eto.widget/id.md), [IsDisposed](https://eto.picoe.ca/api/type/eto.widget/isdisposed.md), [NativeHandle](https://eto.picoe.ca/api/type/eto.widget/nativehandle.md), [Platform](https://eto.picoe.ca/api/type/eto.widget/platform.md), [Properties](https://eto.picoe.ca/api/type/eto.widget/properties.md), [Style](https://eto.picoe.ca/api/type/eto.widget/style.md), [StyleChanged](https://eto.picoe.ca/api/type/eto.widget/stylechanged.md), [Dispose](https://eto.picoe.ca/api/type/eto.widget/dispose.md), [Initialize](https://eto.picoe.ca/api/type/eto.widget/initialize.md), [OnStyleChanged](https://eto.picoe.ca/api/type/eto.widget/onstylechanged.md), [ToString](https://eto.picoe.ca/api/type/eto.widget/tostring.md)
