PROBLEM

Custom Text Elements option missing from the Print widget in Web AppBuilder for ArcGIS

Last Published: June 27, 2023

Description

When attempting to use the advanced pane of the Print widget in Web AppBuilder for ArcGIS, the Custom Text Elements option does not appear in the 'Layout metadata' section.

Image of the missing field

Additionally, web browsers may return the following error message, even if the print service is unsecured:

Error:   
Get Layout Templates Info Error SyntaxError: Invalid or unexpected token

Cause

This issue occurs if the print service is deployed correctly but the MXD templates are out of date and do not match the ArcGIS Server versions, or are incorrectly configured. For example, if an MXD template is created using ArcMap version 10.5, but the ArcGIS Server version is 10.6.

Also, if the MXD templates are out of date and the 'Get Layout Templates Info' tool is present in the geoprocessing service, the error message is returned by the web browser.

Solution or Workaround

The following workaround involves a series of checks to determine the version of the MXD templates. However, before performing the steps provided below, if using a custom print service, run the Get Layout Templates Info geoprocessing tool and add it to the geoprocessing results window. For steps to do so, refer to ArcGIS Help: Preparing and publishing the service.

Note:
Geoprocessing services can only be printed using ArcMap with matching versions of ArcGIS Server. For example, printing using ArcMap 10.6 and ArcGIS Enterprise 10.6.

If the custom print service is deployed correctly, but the Custom Text Elements option does not appear, do the following:

  1. Check the MXD templates and ensure the Element Name field in the Size and Position tab is populated in the text's properties. This ensures that a proper variable name is assigned to the text in the JSON file.
  2. Check if all the MXD templates are created using ArcMap 10.6. If any are out of date, the geoprocessing service is unable to call the JSON text elements.
Note:
Check the developer console for errors when trying to determine if "Get Layout Templates Info' is called by the print service.
  1. Once all the out of date MXD templates are identified and replaced, clear the browser's cache and refresh the page. The custom text element is now available in the templates.

Article ID:000018836

Software:
  • ArcGIS Web AppBuilder
  • ArcMap
  • ArcGIS Server

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic