AnsweredAssumed Answered

Formatting custom text on print template

Question asked by sl5337 on Aug 11, 2014

I've modified one of the standard print templates to allow the user to enter a description of the map as free-form text. Using ArcMap I added a Text element to the layout, saved it, and re-published the service. Using a custom Javascript client interface I present the user with a dialog to enter the map title, author and comments. I pass the comments to the export service in the  PrintTemplate layoutOptions customTextElements array.

 

That all works fine - the comments are included on the PDF file just as I would expect. The problem is that I cannot figure out a good way to wrap the text if it is more than a few words long. If the user is verbose with the comments then they just run off the page in a single line.  I tried using the "NeatLine" object to surround the text element hoping it would constrain the text but it does not. I did notice that hard returns in the comments are honored on the print out. It seems that I may be faced with calculating the length of the text entered by the user and inserting my on line returns. That could get really ugly though since different templates might have different sized comment areas.

 

Has anyone else dealt with this? Thanks in advance for any advice you can give.

Outcomes