ArcObjects Library Reference (Controls)  

IPageLayoutControl3.PrinterPageCount Property

The number of printer pages the PageLayout will cover.

[Visual Basic .NET]
Public Function get_PrinterPageCount ( _
    [ByVal Overlap As Double] _
) As Short
[C#]
public short get_PrinterPageCount (
    double Overlap
);
[C#]

Optional Values

Overlap   Supply 0 as a default value.
[C++]
HRESULT get_PrinterPageCount(
  double Overlap,
  short* PageCount
);
[C++]

Parameters

Overlap [in, optional, defaultvalue(0)]   Overlap is a parameter of type double PageCount [out, retval]   PageCount is a parameter of type short

Product Availability

Available with ArcGIS Engine.

Description

PrinterPageCount uses the Printer to determine the number of printer pages the PageLayout will cover. Use the property before sending output to a printer using the PrintPageLayout method.

Changing the IPage::FormID (pagesize) and IPage::PageToPrinterMapping (scale, crop, or tile page) may change the PrinterPageCount. Supply an overlap argument in IPage::Units when the PageToPrinterMapping property is set to esriPageMappingTile to set the amount of overlap between pages.

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

[C#]

In C# use the get_PrinterPageCount method, as indexed property accessors are not supported.

[Visual Basic .NET]

The IPageLayoutControl3, (and higher numbered IPageLayoutControl3 interfaces) and IPageLayoutControlDefault interfaces have a default indexed property called PrinterPageCount. The Controls interop assembly which provides access to these interfaces have the default PrinterPageCount property. However, if you are working directly with the AxControls class use the get_PrinterPageCount method.

See Also

IPageLayoutControl3 Interface