Print widget

This sample demonstrates how to add a Print widget for a 2D MapView. The widget can preserve map scale or map extent in the printout. By default, the map extent is preserved. Use TemplateOptions.scaleEnabled to preserve scale instead. The widget also prints a localized date in the printout.

The Print widget calls the Get Layout Templates Info task on the GPServer to discover possible customTextElements values for each template. When using a custom print service, values found there will be populated in the Print widget under Advanced options. These values can be overwritten in the Print widget UI, or programmatically using Print.templateCustomTextElements.

Note: printing a SceneView is not possible at this time. Instead, see SceneView.takeScreenshot().

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.