Textsymbol not printing at all

Jump to solution
07-03-2019 06:11 AM
New Contributor III

I've seen a lot of the textsymbol questions in the forums here and have tried every one of them.  My issue is the textsymbol doesn't show up at all on the print.  It shows on the map as built.  Here's the code as to how I'm putting this together.  I also tried putting this layer together by itself (to take the fact there are multiple graphics layers out of the scenario) and still getting the same issues.  Here's my method:

_buildRatioViewerGraphics: function(ratioViewerData){
let features = [];
let textFeatures = [];

arrayUtils.forEach(ratioViewerData, lang.hitch(this, function(ratioFeature){
   let polySymbol = new SimpleFillSymbol(
      new SimpleLineSymbol(
         new Color(this._ratioColorPicker(ratioFeature.attributes.ratio)),
      new Color(this._ratioColorPicker(ratioFeature.attributes.ratio))
   let featureGraphic = new Graphic(ratioFeature);

   let textColor = new Color();
   textColor.setColor([0, 0, 0, 1]);

   let textFont = new Font();

   let textSymbol = new TextSymbol()
      .setHaloColor(new Color([255, 255, 255, 0.3]))
      textSymbol.horizontalAlignment = "center";
      textSymbol.verticalAlignment = "center";
      let textFeatureGraphic = new Graphic(ratioFeature);

   this.featureLayer.applyEdits(features, null, null);
   this.textFeatureLayer.applyEdits(textFeatures, null, null);

return features;
0 Kudos
1 Solution

Accepted Solutions
Esri Regular Contributor

Thanks Dean Wilson‌.

It looks like the graphic layer that your JS code creates to show text, are of polygon type. That is currently not supported in print services.

Try change that to point geometry type. That should make it to work.

see the attached .zip file that is a modified version of what you sent me. if you use that in a request to your print service, you should see one feature gets labeled (to keep it simple, I removed all other labels from the json).

hope this helps.

View solution in original post

19 Replies
New Contributor III

Bumping this question.... Just checking to see if I should word this any different maybe? Still not functioning right.

0 Kudos
New Contributor
0 Kudos
New Contributor III

Thanks for the tip. I'll look into the labeling part of it.  But, what if I only have a text symbol? Those are the things that aren't printing.  I can take out the other graphic features and just leave the textsymbol and it doesn't show up in the print.  

P.S. I didn't add this before, and I should have, but I'm using the 3.x api, not the 4.x..

0 Kudos
Esri Regular Contributor

I did a quick sanity check and I am able to print TextSymbols with 3.29. Couple questions for you:

1) What (ArcGIS Server) version of the print service are you using? If you try the AGO print service, do you get the same result?

printUrl = "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";

2) Are you adding those TextSymbols as a GraphicsLayer to a FeatureLayer through the applyEdits() method? Do you see the TextSymbols in the printout if you just add the GraphicsLayer (or each Graphic) to the map?

0 Kudos
New Contributor III

Hi Noah,

To answer your questions:

1) We're using arcgis server 10.4.1 for all of our services, including the print service.

2) Yes I'm adding the textsymbols as graphics to a featurelayer thru applyEdits().  The textsymbols are on the map as displayed, just not in the prints.  The rub with all of this is I'm building the feature layers off of a featurecollection that uses the attributes that I make, not the arcgis server.  Maybe thats the issue but I'm not 100%.  There's really not much I can do about that because I'm pulling the attribute data from a third party sql server on premise, and not attributes from arcgis.  Hopefully that makes sense.. let me know if i have to explain that different.  


0 Kudos
Esri Regular Contributor

Thanks Dean. There were two other things I was hoping you could test. I'll re-word the second to make it more clear:

1) If you try the AGO print service, do you get the same result?

printUrl = "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%...";


2) Do you see the TextSymbols in the printout if you just add the GraphicsLayer (or each Graphic) to the map instead of adding them to a FeatureLayer first?

0 Kudos
New Contributor III


The print widget that I'm using (I'm utilizing the print widget from webappbuilder)  Won't take the url that you mentioned when I put it in the config for "serviceUrl".  Any ideas on that?  

I did add the textsymbols straight to the map using:


But still not showing on the print. It may be the print service in 10.4 has a bug in it.. Not sure how I can test that other then upgrading the arcgis server we have on-premise.

0 Kudos
New Contributor III

Another bump on this question. I've tried the few things Noah mentioned but to no avail.  Is this a print service issue that's used in 10.4 server? 

0 Kudos
New Contributor III

Bump! Hopefully this doesn't fall into the GEONET black hole..  

0 Kudos