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


IPageLayoutControl3.PrintPageLayout Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Controls)  

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#]

Optional Values

StartPage   Supply 1 as a default value.
EndPage   Supply 0 as a default value.
Overlap   Supply 0 as a default value.
[C++]
HRESULT PrintPageLayout(
  short StartPage,
  short EndPage,
  double Overlap
);
[C++]

Parameters StartPage [in, optional, defaultvalue(1)] StartPage is a parameter of type short EndPage [in, optional, defaultvalue(0)] EndPage is a parameter of type short Overlap [in, optional, defaultvalue(0)] 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