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 );
Optional Values
[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
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.
Errors Returned
1000 800a03e8: An internal call to create an object has
failed
1001 800a03e9: No printer object available on the
PageLayoutControl
1002 800a03ea: Start page number is out of range
1003 800a03eb: End page is out of range
Remarks
Before using the PrintPageLayout property, ensure that the orientation of IPrinter::Paper is the same orientation as the Page.
IPrinter printer = axPageLayoutControl1.Printer;
if (printer.Paper.Orientation != axPageLayoutControl1.Page.Orientation)
{
printer.Paper.Orientation = axPageLayoutControl1.Page.Orientation;
}
axPageLayoutControl1.PrintPageLayout(1, 1, 0);/PRE>
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
IPageLayoutControlDefault Interface | IPageLayoutControlDefault.Page Property | IPageLayoutControlDefault.PageLayout Property | IPageLayoutControlDefault.Printer Property | IPageLayoutControlDefault.PrinterPageCount Property