Print active view


Purpose
This sample demonstrates how to use the printer objects and application programming interfaces (APIs) in the com.esri.arcgis.output package to print the active view of a MapBean to the default printer device. This sample also demonstrates how to create a custom command button and add it to the ToolbarBean to perform this operation.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the PrintActiveView application.
  2. Click Open to open an MXD file. A custom command button is added to the toolbar (a rabbit icon).
  3. Use this command to send the active view to the default printer.


Download the files for Java
mapbean/PrintActiveView.java Main class
mapbean/commands/PrintActiveViewCommand.java Command class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView
ArcEditor
ArcInfo