Add custom text element to print layout in print widget

869
2
Jump to solution
01-10-2021 06:21 AM
Labels (1)
MHasan
by
New Contributor II

Hello everyone.

I have been trying to create a printing service from tools published from ArcGIS Pro using the following tutorial:

Share custom layouts for printing from ArcGIS Pro—ArcGIS Server | Documentation for ArcGIS Enterpris...

I want to add a custom text element and let the user enter the text value in the print widget.

The tutorial indicates that :

"If you want to insert a custom text element, add a text element and embed the element's name in a set of open and closed curly braces, such as {parcel-id}."

But it doesn't tell how and where to embed the element name.

 

0 Kudos
1 Solution

Accepted Solutions
LongDinh
Occasional Contributor

Hi MHasan,

I was also perplexed by this vague description as well. Luckily I found the solution by looking at the default installation templates.

The name of the element is the Table of Contents when in Layout mode. Adding a open and closed curly bracket will add the element to the Print Layout Template JSON's "customTextElements" array.

Below is a screen capture of the "Get Layout Templates Info" which has successfully added the "{VeryCustomElementName}" dynamic element to the print template

LongDinh_0-1613970623211.png

 

View solution in original post

2 Replies
LongDinh
Occasional Contributor

Hi MHasan,

I was also perplexed by this vague description as well. Luckily I found the solution by looking at the default installation templates.

The name of the element is the Table of Contents when in Layout mode. Adding a open and closed curly bracket will add the element to the Print Layout Template JSON's "customTextElements" array.

Below is a screen capture of the "Get Layout Templates Info" which has successfully added the "{VeryCustomElementName}" dynamic element to the print template

LongDinh_0-1613970623211.png

 

View solution in original post

MHasan
by
New Contributor II

Thank you very much @LongDinh 

It's really easy but it wasn't obvious from the documentation.

0 Kudos