OutputExtensions


Supported with:
  • ArcView
  • ArcEditor
  • ArcInfo
Library dependencies: System, SystemUI, Geometry, GraphicsCore, Display, Server, Output, Geodatabase, GISClient, DataSourcesFile, DataSourcesGDB, DataSourcesOleDB, DataSourcesRaster, DataSourcesNetCDF, GeoDatabaseDistributed, GeoDatabaseExtensions, Carto, NetworkAnalysis, Location, GeoAnalyst, Animation, Maplex, Geoprocessing, NetworkAnalyst, Schematic, SpatialAnalyst, 3DAnalyst, GlobeCore, EngineCore, TrackingAnalyst, Framework, GeoDatabaseUI, DisplayUI, OutputUI, Search, Catalog, CatalogUI, CartoUI, DataSourcesRasterUI, ArcCatalog, ArcCatalogUI, ArcMap, ArcMapUI, AnimationUI, Editor, GeoReferenceUI, EditorExt, LocationUI, GeoDatabaseDistributedUI, GeoprocessingUI

Additional library information: Contents, Object Model Diagram

To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
The OutputExtensions library extends the core output functionality with more advanced output capabilities. The ArcPress printer engine is implemented by this library. For an example of how to use the ArcPress printer engine, see the Print active view with ArcPress sample.
 
This library is not extended by developers.

See the following sections for more information about this namespace:

ArcPress Printer Engine (IArcPressPrinter)

The ArcPress Printer Engine functionality is described in more detail in the following sections:
Autoselecting the ArcPress driver
The ArcPress printer engine has several drivers that are meant for different makes and models of large-format printers. To automatically select the appropriate driver for the given printer, pass the printer's name to the IArcPressPrinter.AutoSelectDriverByName method as shown in the following code example:
[C#]
//Autoselect the driver based on the printer's name.
IPaper paper = mxApplication.Paper;
arcPressPrinter.AutoSelectDriverByName(paper.PrinterName);
[VB.NET]
'Autoselect the driver based on the printer's name.
Dim paper As IPaper = mxApplication.Paper
arcPressPrinter.AutoSelectDriverByName(paper.PrinterName)
After the call to AutoSelectDriverByName, check that a driver was selected using the SelectedDriverId property as shown in the following code example. If it is null, the printer is not compatible with the ArcPress printer engine.
[C#]
//If the printer cannot be autoselected, exit.
if (arcPressPrinter.SelectedDriverId == null)
{
    MessageBox.Show("Could not autoselect ArcPress driver for printer");
    return ;
}
[VB.NET]
'If the printer cannot be autoselected, exit.
If arcPressPrinter.SelectedDriverId Is Nothing Then
    MessageBox.Show("Could not autoselect ArcPress driver for printer")
    Return
End If
Cast the IArcPressPrinter object onto the IPrinter object as shown in the following code example:
[C#]
//Transfer the ArcPress printer properties into printer.
printer = arcPressPrinter as IPrinter;
[VB.NET]
'Transfer the ArcPress printer properties into printer.
printer = TryCast(arcPressPrinter, IPrinter)
The full example for the above lines of code for auto selecting the ArcPress printer drivers is as follows:
[C#]
public void AutoSelectTheArcPressDriver(IMxApplication mxApplication,
    IArcPressPrinter arcPressPrinter, IPrinter printer)
{
    //Autoselect the driver based on the printer's name.
    IPaper paper = mxApplication.Paper;
    arcPressPrinter.AutoSelectDriverByName(paper.PrinterName);

    //If the printer cannot be autoselected, exit.
    if (arcPressPrinter.SelectedDriverId == null)
    {
        MessageBox.Show("Could not autoselect ArcPress driver for printer");
        return ;
    }

    //Transfer the ArcPress printer properties into printer.
    printer = arcPressPrinter as IPrinter;
}
[VB.NET]
Public Sub AutoSelectTheArcPressDriver(ByVal mxApplication As IMxApplication, ByVal arcPressPrinter As IArcPressPrinter, ByVal printer As IPrinter)
    
    'Autoselect the driver based on the printer's name.
    Dim paper As IPaper = mxApplication.Paper
    arcPressPrinter.AutoSelectDriverByName(paper.PrinterName)
    
    'If the printer cannot be autoselected, exit.
    If arcPressPrinter.SelectedDriverId Is Nothing Then
        MessageBox.Show("Could not autoselect ArcPress driver for printer")
        Return
    End If
    
    'Transfer the ArcPress printer properties into printer.
    printer = TryCast(arcPressPrinter, IPrinter)
    
End Sub
Setting color options
The ArcPress printer driver contains several color-adjustment options such as Gamma, Brightness, Contrast, and Saturation. These can be set using the SetColorAdjustment method. To get the current color adjustment parameters, use the GetColorAdjustment method. Note that lgammax100 is the decimal gamma value, multiplied by 1,000; the default value of 2.2 becomes 220. The lbrightness value defaults to zero. The integer value can vary between –256 and 256. Lastly, lcontrast and lsaturation default to 256 (which corresponds to the middle position on the slider), and the value can vary between 0 and 512. The values are internally limited, so if a value above the maximum or below the minimum is selected, it will be automatically reset to the maximum or minimum value.
Setting the SavePaper option
The ArcPress printer driver can autorotate the print to save paper. This property can be set to true to enable autorotation, or false to disable it. ArcPress only autorotates the print if the maximum printable area of the printer's largest page size can contain the rotated print job.

IArcPressPrinterEx interface

The IArcPressPrinterEx interface is not meant for use by external ArcObjects developers.