Select to view content in your preferred language

How to add custom text elements to custom print layout using WAB print widget?

25388
37
06-01-2016 06:05 AM
HelenWhiteley
New Contributor III

Hi,

I am trying to create print templates which enable the user to add more text to a layout than just the title and author.  I have added elements to the mxd and named them and tried to call them using CustomTextElements, but do not know how to make the text box for the user to enter the text into appear within the print widget.  I'm sure I'm missing something simple?!  I am using the Web Appbuilder in ArcGIS Portal 10.4 and also have access to WAB for Developers 2.0.

Please help,

Thanks,

Helen

37 Replies
CaseyRagain
New Contributor II

Will these links work for ArcGIS for Desktop and Server 10.2.2? Thanks.

0 Kudos
LeoLadefian5
Occasional Contributor II

How does one create a custom text element in their layout?  This is what I'm stuck on, for instance, a "Comments" field as user input.  Do I use custom dynamic text?

0 Kudos
TanuHoque
Esri Regular Contributor

a blog article has recently been posted to walk thru the process of creating and using customTextElement. here is the link Printing Popups from Web Application | ArcGIS Blog. i hope this will help.

MihkelMänna
Occasional Contributor

Hi, Tanu Hoque!

Your post about printing popups from an web application was very interesting. I also have some problems with printing services and I really hope you can help.

I have been using Custom Text Elements for some time now for printing in my applications but my users want the printing service to be more customizable. At the moment the users insert text via a form for some Custom Text Elements that are printed on the map. The problem is that the space allocated for the text elements is static - sometimes all the text fields are not filled and needed and should therefore be removed from map, sometimes the users need more space for their text than the space I have allocated for the text elements. How could this be solved? I have considered adding these texts as (SVG) text graphics but I'm not sure if it is a reasonable solution.

Another issue I am encountering is adding an appropriate grid background to the map's data frame. At the moment, all of my MXDs are using one specific UTM zone coordinate system, but I'd want the data frame's coordinate system to change according to the printed map geographic extent. As I need to switch primarily between only two coordinate systems (UTM zones), making MXD templates for both of them is simple. The tricky part is that I also have to tackle cases where the printed map's extent falls into both UTM zones (that is, I'd have to display UTM grids on the map in both coordinate systems). How could this be solved?

I would be extremely thankful if you could guide me in a right direction with either or both these problems.

Mihkel

0 Kudos
TanuHoque
Esri Regular Contributor

Re: custom text element issue -  this is the case where I'd try the arcpy based printing solution that is mentioned as the #2 option in the blog post? did that not work for you?

about your second issue, I'm not quite sure. let me check with folks with expertise in grid & graticule and will get back to you once i find something.

0 Kudos
MihkelMänna
Occasional Contributor

Thanks for the answer, Tanu!

I previously apparently misread your blog post and understood that the added text would have to be on a separate page. But if the text can also be on the map, I'll certainly give it a try!

0 Kudos
MihkelMänna
Occasional Contributor

Hi again, Tanu Hoque!

The arcpy based printing solution worked like a charm for my first problem! Thank you! However, I'm still wondering as to what would be the right solution to tackle the multiple coordinate system problem. Should I try exploiting the Make Grids and Graticules tool in my GP script? Any assistance would be very welcome!

Mihkel

0 Kudos
MihkelMänna
Occasional Contributor

OK, so if anyone else is wondering how to get dynamic grids with UTM zone change to work with their printing services, the Make Grids and Graticules tool works well for this. Just add the grid feature classes to the MXD in the right order (creating a feature layer for each feature class and setting the representations first). The grid template XML files (with "UTMZoneClipping" in the file name) under the ArcGIS/Desktop10.x/GridTemplates directory are a good place to start.

SanneMikkelsen
Occasional Contributor

HelenWhiteley‌, did you ever get this to work with the custom text in the print-widget in WAB?

0 Kudos
HelenWhiteley
New Contributor III

Hi Sanne,

Yes, I did.  Unfortunately I don't remember how!  From what I can see, the trick may have been to make sure the element in the template had a name (text box properties > Size and position > element name)?

0 Kudos