Version

PrintDocument Property

Creates and returns a PrintDocument object used for printing the chart.
Syntax
'Declaration
 
Public ReadOnly Property PrintDocument As PrintDocument
public PrintDocument PrintDocument {get;}
Remarks

Each request for this property will result in a new PrintDocument being created, so avoid repeated requests to this Property getter.

The PrintDocument given by this property is returned and no longer referenced by the chart component; therefore, it is the Application's responsibility to dispose of the PrintDocument when it is no longer in use.

Example
Dim doc As System.Drawing.Printing.PrintDocument = Me.UltraChart1.PrintDocument
doc.DefaultPageSettings.Margins.Top = 0
doc.DefaultPageSettings.Margins.Left = 500
doc.DefaultPageSettings.Margins.Bottom = 600
doc.Print()
doc.Dispose()
System.Drawing.Printing.PrintDocument doc = this.ultraChart1.PrintDocument;
doc.DefaultPageSettings.Margins.Top = 0;
doc.DefaultPageSettings.Margins.Left = 500;
doc.DefaultPageSettings.Margins.Bottom = 600;
doc.Print();
doc.Dispose();
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also