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


IMapDocument.Printer Property (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Carto)  

IMapDocument.Printer Property

The printer object. If no printer object is stored in the map document this returns NULL.

[Visual Basic .NET]
Public ReadOnly Property Printer As IPrinter
[C#]
public IPrinter Printer {get;}
[C++]
HRESULT get_Printer(
  IPrinter** ppPrinter
);
[C++]

Parameters ppPrinter [out, retval]
ppPrinter is a parameter of type IPrinter**

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The Printer stored in the MapDocument. If a map document (*.mxd) or map template (*.mxt) is Open the Printer returned will be the printer stored in the document when it was last saved. If no printer is saved in the document the Printer will be nothing. If a Published Map File (*.pmf) or layer file (*.lyr) is Open the Printer will be nothing. Creating a New MapDocument will set the Printer to nothing.

Remarks

If the Printer cannot be found on the system, a message box will display indicating that the printer is not installed. The MessageLogger can be used to switch this message off.

See Also

IMapDocument Interface