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


IPageLayoutControl3.PrintPageLayout Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IP > IPageLayoutControl3 Interface > IPageLayoutControl3.PrintPageLayout Method
ArcGIS Developer Help

IPageLayoutControl3.PrintPageLayout Method

Sends the specified range of pages on the printer.

[Visual Basic .NET]
Public Sub PrintPageLayout ( _
    [ByVal StartPage As Short], _
    [ByVal EndPage As Short], _
    [ByVal Overlap As Double] _
)
[C#]
public void PrintPageLayout (
    short StartPage,
    short EndPage,
    double Overlap
);
[C++]
HRESULT PrintPageLayout(
  short StartPage,
  short EndPage,
  double Overlap
);
[C++]
Parameters
StartPage [in, optional, defaultvalue()]

StartPage is a parameter of type short EndPage [in, optional, defaultvalue()]
EndPage is a parameter of type short Overlap [in, optional, defaultvalue()]
Overlap is a parameter of type double

Product Availability

Available with ArcGIS Engine.

Description

PrintPageLayout sends the PageLayout to the Printer. If the Page does not fit the IPrinter::Paper, the value of IPage::PageToPrinterMapping will determine whether the Page is cropped, scaled or tiled across the Printer's paper.

Remarks

Before using the PrintPageLayout property, ensure that the orientation of IPrinter::Paper is the same orientation as the Page.

[C#]
IPrinter printer = axPageLayoutControl1.Printer;
if (printer.Paper.Orientation != axPageLayoutControl1.Page.Orientation)
{
    printer.Paper.Orientation = axPageLayoutControl1.Page.Orientation;
}
axPageLayoutControl1.PrintPageLayout(1, 1, 0);/PRE>
[Visual Basic .NET]
Dim pPrinter As IPrinter
pPrinter = AxPageLayoutControl1.Printer   
If  pPrinter.Paper.Orientation <> AxPageLayoutControl1.Page.Orientation Then
  pPrinter.Paper.Orientation = AxPageLayoutControl1.Page.Orientation
End If
AxPageLayoutControl1.PrintPageLayout(1, 1, 0)

See Also

IPageLayoutControl3 Interface