com.esri.arcgis.output
Interface IPrinter

All Superinterfaces:
Serializable
All Known Implementing Classes:
EmfPrinter, PsPrinter

public interface IPrinter
extends Serializable

Provides access to members that control the Printer Driver.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
com.esri.arcgis.output.IMxApplication

Method Summary
 boolean doesDriverSupportPrinter(String printerName)
          Indicates if the Printer Name passed into function is supported by the IPrinter Driver.
 void finishPrinting()
          Finish up Printing.
 String getDriverName()
          The name of Windows Printer Driver.
 String getFileExtension()
          File Extension associated with the Printer Driver.
 String getFilter()
          Filter used in CFileDialog.
 String getName()
          Name of the IPrinter Driver.
 IPaper getPaper()
          The IPaper interface.
 IEnvelope getPrintableBounds()
          The area of the printer page that can be printed on.
 String getPrintToFile()
          The name of file if saving to Disk.
 short getResolution()
          The Printer Driver Resolution.
 String getSpoolFileName()
          The Spool File Name which shows up in the Print Manager.
 int getUnits()
          The units for PaperSize and PrintableBounds.
 void queryPaperSize(double[] width, double[] height)
          Returns Page Size for Printer.
 void setPaperByRef(IPaper paper)
          The IPaper interface.
 void setPrintToFile(String fileName)
          The name of file if saving to Disk.
 void setResolution(short res)
          The Printer Driver Resolution.
 void setSpoolFileName(String spoolFileName)
          The Spool File Name which shows up in the Print Manager.
 void setStepProgressor(IStepProgressor rhs1)
          Updates a Progress Bar is set.
 int startPrinting(IEnvelope pixelBounds, int hDcPrinter)
          Initialize Printing.
 boolean verifyDriverSettings()
          Indicates if the Printer Driver should validate Printer Driver's local settings.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Name of the IPrinter Driver.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFilter

String getFilter()
                 throws IOException,
                        AutomationException
Filter used in CFileDialog.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFileExtension

String getFileExtension()
                        throws IOException,
                               AutomationException
File Extension associated with the Printer Driver.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPrintToFile

void setPrintToFile(String fileName)
                    throws IOException,
                           AutomationException
The name of file if saving to Disk.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPrintToFile

String getPrintToFile()
                      throws IOException,
                             AutomationException
The name of file if saving to Disk.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDriverName

String getDriverName()
                     throws IOException,
                            AutomationException
The name of Windows Printer Driver.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSpoolFileName

void setSpoolFileName(String spoolFileName)
                      throws IOException,
                             AutomationException
The Spool File Name which shows up in the Print Manager.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSpoolFileName

String getSpoolFileName()
                        throws IOException,
                               AutomationException
The Spool File Name which shows up in the Print Manager.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setResolution

void setResolution(short res)
                   throws IOException,
                          AutomationException
The Printer Driver Resolution.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getResolution

short getResolution()
                    throws IOException,
                           AutomationException
The Printer Driver Resolution.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setStepProgressor

void setStepProgressor(IStepProgressor rhs1)
                       throws IOException,
                              AutomationException
Updates a Progress Bar is set.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
rhs1 - A reference to a com.esri.arcgis.system.IStepProgressor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPaperByRef

void setPaperByRef(IPaper paper)
                   throws IOException,
                          AutomationException
The IPaper interface.

Product Availability

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

Parameters:
paper - A reference to a com.esri.arcgis.output.IPaper (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPaper

IPaper getPaper()
                throws IOException,
                       AutomationException
The IPaper interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.output.IPaper
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 Page Size for Printer.

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.

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.

getUnits

int getUnits()
             throws IOException,
                    AutomationException
The units for PaperSize and PrintableBounds.

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.

verifyDriverSettings

boolean verifyDriverSettings()
                             throws IOException,
                                    AutomationException
Indicates if the Printer Driver should validate Printer Driver's local settings.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

doesDriverSupportPrinter

boolean doesDriverSupportPrinter(String printerName)
                                 throws IOException,
                                        AutomationException
Indicates if the Printer Name passed into function is supported by the IPrinter Driver.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

startPrinting

int startPrinting(IEnvelope pixelBounds,
                  int hDcPrinter)
                  throws IOException,
                         AutomationException
Initialize Printing.

Remarks

The StartPrinting method returns a long that represents the hDC (Windows GDI Device Context handle) of the printer object. After this method is called, the printer object is ready to receive GDI draw instructions directed to its hDC.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
pixelBounds - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
hDcPrinter - The hDcPrinter (A COM typedef) (in)
Returns:
The hDcRet (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

finishPrinting

void finishPrinting()
                    throws IOException,
                           AutomationException
Finish up Printing.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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