English

How To: Hide the legend while printing the map generated by the HTML Viewer

Summary

Instructions provided describe the proceedure to use to hide the legend while printing a map generated by the HTML Viewer. Editing one of the javascript files in the HTML Viewer web site allows the option.

Procedure

Edit one of the javascript files in the HTML Viewer Web site with the following steps:

  1. Open the aimsPrint.js file in a text editor. This file is created by ArcIMS Designer and placed in the javascript directory of the Web site directory.
  2. Set legendVisible to false under the getPrintMap(title) function, as shown below:
    Code:
    // create web page for printing
    // first get Map
    function getPrintMap(title) {
    ...
    if (aimsLegendPresent) legendVisible=false;
    ...
    }

  3. Comment the 3 lines relating to the legend for the print page under the writePrintPage() function, as shown below:
    Code:
    // fourth, write the web page
    function writePrintPage() {
    ...
    //Win1.document.writeln(' <TD ALIGN="CENTER" VALIGN="TOP">');
    //Win1.document.writeln(' <IMG SRC="' + printLegURL + '" HSPACE=0 VSPACE=0 BORDER=0 ALT="">');
    //Win1.document.writeln(' </TD>');
    ...
    }

  4. Save and close the aimsPrint.js file.
  5. Access the Web site in a fresh browser to view the changes in the print page of the map.
    An example of how the print page appears after making the above changes is shown here:
    [O-Image] Print Page of the HTML document without the legend.
    Note:
    The aimsPrint.js file can be edited further to customize the print page of the map.

Related Information