This document is archived and information here might be outdated.  Recommended version.


IPageLayoutControlDefault.Printer Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPageLayoutControlDefault Interface > IPageLayoutControlDefault.Printer Property
ArcGIS Developer Help

IPageLayoutControlDefault.Printer Property

The printer object used by the PageLayoutControl for printing.

[Visual Basic .NET]
Public Property Printer As IPrinter
[C#]
public IPrinter Printer {get; set;}
[C++]
HRESULT get_Printer(
void
);
[C++]
HRESULT putref_Printer(
);

Product Availability

Available with ArcGIS Engine.

Description

Unless the Printer property has been set to a specific printer, the property will return the default system printer. Before issuing a print always check that the PageLayoutControl has a printer.

[C#]
if (axPageLayoutControl1.Printer != null)
{
    axPageLayoutControl1.PrintPageLayout(1, 1, 0);
}
[Visual Basic .NET]
If Not AxPageLayoutControl1.Printer Is Nothing Then
  AxPageLayoutControl1.PrintPageLayout(1, 1, 0)
End If

See Also

IPageLayoutControlDefault Interface