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.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close