Print task |
|
Release 9.3.1 |
The Print task allows the user to print the map along with any task results they choose. When invoked from the Web application, the task displays a print dialog box that allows the user to enter a title for their map, set the map size and quality, and choose any task results to print under the map. Clicking the button to create the printed page opens a new browser window with a preview of the printed page. The user can then print to any available printer.
The Print task doesn't require any configuration in Manager unless you want to change the default settings that Manager provides. For example, you can change the default map title and select the legend items that you want to print.
To add and configure the Print task in Manager follow these guidelines:
You can edit your completed application in Visual Studio or Visual Web Developer Express to get more control over Print Task properties such as width settings, quality settings, and north arrow settings. However, you have to set these properties for every Web application you create.
The Print Task uses a configuration file to store the predefined values. Thus, if you want to replace these values with your own values, you can do so by editing the configuration file in a text editor. Any newly created applications will then use the new predefined values.
The configuration file is located in the folder <install_location>/Dotnet and is called ESRI.ArcGIS.ADF.Tasks.dll.config. To change the page size or print quality names that display (e.g., small, draft), you will need to add a new attribute called Name. This will override the current predefined value, which is stored in a resource file for localization purposes. For example, here is one entry for the page size with Name added:
<Size ID="PrintTaskSize0" Name="Small Map" SizeHeight="3.0" SizeWidth="3.0" Unit="Inches" />
When setting the page size and quality, keep in mind that the GIS server imposes limits on the maximum image size it can return. For example, ArcGIS Server map services, by default, restrict the image size to a maximum of 2048 x 2048 pixels. This means that a 10 inch square map with a quality of 200 dpi is 2000 x 2000 pixels. If the print task map request exceeds the limits of the GIS server, the particular service will not print.
See the Print Task discussion in the ArcGIS Server Developer Help to learn more about working with the Print Task in a development environment.