Edit this page

Overview

RadPrintDocument is used to send output to a printer. The RadPrintDocument can be used in the VS designer as described in Design time article or can be created and used at run time. The most common scenario of using RadPrintDocument is to create an instance, set the properties that describe how the page is printed, set the AssociatedObject property to an instance of an object implementing the IPrintable interface and call the Print method to send the print job to the printer. Here is how this looks like in C# and VB:

RadPrintDocument document = new RadPrintDocument();
document.DefaultPageSettings.Landscape = true;
document.DefaultPageSettings.PrinterSettings.Copies = 2;
document.AssociatedObject = this.radGridView1;
document.Print();

Dim document As New RadPrintDocument()
document.DefaultPageSettings.Landscape = True
document.DefaultPageSettings.PrinterSettings.Copies = 2
document.AssociatedObject = Me.RadGridView1
document.Print()

tpf-printing-support-radprintdocument

See Also