com.esri.arcgis.output
Interface IPaper

All Superinterfaces:
Serializable
All Known Implementing Classes:
Paper

public interface IPaper
extends Serializable

Provides access to members that control the default printer page settings.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IPrinter.getPaper()

Method Summary
 void attach(int hDevMode, int hDevNames)
          Attach object to specified DEVMODE and DEVNAMES structures.
 short getFormID()
          The printer page form.
 String getFormName()
          The Form Name.
 IEnumNamedID getForms()
          Enumerate forms supported by the printer.
 short getOrientation()
          The printer page orientation (1 = portrait.
 IEnvelope getPrintableBounds()
          The area of the printer page that can be printed on.
 int getPrinterInfo(int[] hDevMode)
          Display the Print Setup Dialog.
 String getPrinterName()
          The Printer Name.
 short getTrayID()
          The printer tray.
 IEnumNamedID getTrays()
          Enumerate trays supported by the printer.
 int getUnits()
          The units used by the other properties.
 void queryPaperSize(double[] width, double[] height)
          Returns the size of the printer paper.
 void setFormID(short formID)
          The printer page form.
 void setOrientation(short orientation)
          The printer page orientation (1 = portrait.
 void setPrinterName(String printerName)
          The Printer Name.
 void setTrayID(short trayID)
          The printer tray.
 

Method Detail

getUnits

int getUnits()
             throws IOException,
                    AutomationException
The units used by the other properties.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.system.esriUnits constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPrintableBounds

IEnvelope getPrintableBounds()
                             throws IOException,
                                    AutomationException
The area of the printer page that can be printed on.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOrientation

short getOrientation()
                     throws IOException,
                            AutomationException
The printer page orientation (1 = portrait. 2 = landscape).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The orientation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setOrientation

void setOrientation(short orientation)
                    throws IOException,
                           AutomationException
The printer page orientation (1 = portrait. 2 = landscape).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
orientation - The orientation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getForms

IEnumNamedID getForms()
                      throws IOException,
                             AutomationException
Enumerate forms supported by the printer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.system.IEnumNamedID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFormName

String getFormName()
                   throws IOException,
                          AutomationException
The Form Name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The formName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFormID

short getFormID()
                throws IOException,
                       AutomationException
The printer page form. Use Win32 DMPAPER_xxx constants.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The formID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFormID

void setFormID(short formID)
               throws IOException,
                      AutomationException
The printer page form. Use Win32 DMPAPER_xxx constants.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
formID - The formID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTrays

IEnumNamedID getTrays()
                      throws IOException,
                             AutomationException
Enumerate trays supported by the printer.

Remarks

Use the Trays enumerator to get a list valid tray ids for the currently selected printer. The returned tray ids can be used in the IPaper interface's TrayID property.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.system.IEnumNamedID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTrayID

short getTrayID()
                throws IOException,
                       AutomationException
The printer tray. Use Win32 DMBIN_xxx constants.

Remarks

Use the TrayID property to control which paper tray will be used for feeding printer paper. Because the value of the TrayID property will be used by the printer driver directly, it must contain a valid value at print time. The Win32 API documentation makes reference to these values as the DMBIN contstants. In practice, no printer driver supports the full range of DMBIN paper tray values; usually only a small subset is valid. Thus, it is not possible to assign an arbitrary DMBIN constant to the TrayID property. You must always first enumerate for valid tray ids before assigning. Use the IPaper interface's Trays enumerator to get a list valid tray ids for the currently selected printer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The trayID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTrayID

void setTrayID(short trayID)
               throws IOException,
                      AutomationException
The printer tray. Use Win32 DMBIN_xxx constants.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
trayID - The trayID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPrinterName

String getPrinterName()
                      throws IOException,
                             AutomationException
The Printer Name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The printerName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPrinterName

void setPrinterName(String printerName)
                    throws IOException,
                           AutomationException
The Printer Name.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
printerName - The printerName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attach

void attach(int hDevMode,
            int hDevNames)
            throws IOException,
                   AutomationException
Attach object to specified DEVMODE and DEVNAMES structures. This must be called before using other properties and methods.

Remarks

This method is used by the Printer object, called when the IPrinter::Paper property is set. Most ArcObjects developers will not need to use this method unless they are doing a custom implementation of IPrinter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
hDevMode - The hDevMode (A COM typedef) (in)
hDevNames - The hDevNames (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryPaperSize

void queryPaperSize(double[] width,
                    double[] height)
                    throws IOException,
                           AutomationException
Returns the size of the printer paper. Units property specifies measurement units.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
width - The width (out: use single element array)
height - The height (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPrinterInfo

int getPrinterInfo(int[] hDevMode)
                   throws IOException,
                          AutomationException
Display the Print Setup Dialog.

Product Availability

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

Parameters:
hDevMode - The hDevMode (A COM typedef) (out: use single element array)
Returns:
The hDevNames (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.