English

How To: Remove the Advanced option in the Print widget for Web AppBuilder for ArcGIS (Developer Edition)

Summary

The Print widget in Web AppBuilder for ArcGIS (Developer Edition) has an 'Advanced' option for print settings. The Advanced option may be removed to preserve the map to avoid any loss of information, or to prevent loss of watermark or copyright details on the map. For example, if copyright details are set on the bottom corner of the map, zooming out or setting the desired size of the map may eliminate the copyright.

Image of the Print widget

Procedure

To remove the Advanced option in the Print widget, the Print.js file must be modified by commenting out line 453 and line 458 from the script. The instructions provided describe how to disable the Advanced option in the Print widget.

The image of code for line 453 and line 458
The Advanced option can be disabled for Web AppBuilder for ArcGIS application in general, or for specific apps.

  • To disable the Advanced option in the Print widget for Web AppBuilder for ArcGIS in general, navigate to the Web AppBuilder for ArcGIS folder > client > stemapp > widgets > Print.
[Install_DIR]\client\stemapp\widgets\Print
  • To disable the Advanced option in the Print widget for a specific app, navigate to the Web AppBuilder for ArcGIS folder > server > [App Name] > widgets > Print.
[Install_DIR]\[App_Name]\widgets\Print
  1. Open the Print.js file using a text editor, preferably one with the line numbers built in, for example, Notepad++.
  2. Navigate to line 453, and line 458, and comment both lines. The code snippet below shows an example of the final code.
_handlePrintInfo: function(rData) {
      if (!rData.isGPPrint) {
        domStyle.set(this.layoutDijit.domNode.parentNode.parentNode, 'display', 'none');
        domStyle.set(this.formatDijit.domNode.parentNode.parentNode, 'display', 'none');
      //domStyle.set(this.advancedButtonDijit.domNode, 'display', 'none');  // line# 453
      } else {
        var data = rData.data;
        domStyle.set(this.layoutDijit.domNode.parentNode.parentNode, 'display', '');
        domStyle.set(this.formatDijit.domNode.parentNode.parentNode, 'display', '');
      //domStyle.set(this.advancedButtonDijit.domNode, 'display', '');   // line# 458

Related Information