Graphic textSymbol added to javascript API map doesn't "print"

2037
3
Jump to solution
10-31-2014 09:48 AM
JohnChurchill
New Contributor III

I combined samples for Printing with graphics

https://developers.arcgis.com/javascript/jssamples/widget_print.html

and labeling

https://developers.arcgis.com/javascript/jssamples/util_label_point.html

and I may have drawn upon this too? ...

Drawing Graphics

http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=toolbar_draw

The map I made works except for when I go to print to PDF or JPG using the "Prep Map" and Print buttons and the problem is very specific to the use of the "Text Label" button (at the bottom of the list of buttons). The graphic points show up on the map as red dots and the text label both show up on the map in the browser but NOT in the output image. I tried setting an offset on the label and that does not seem to help. I'm beginning to think this must be a bug. Can anyone please help me with this?

I made a Fiddle showing the problem. See especially my comment on line 212 in the Fiddle or see my other post on StackExchange

Edit fiddle - JSFiddle

I also asked this here

multiple graphics added to ArcGIS javascript API map are not printing (using MapExport) reliably - G...

0 Kudos
1 Solution

Accepted Solutions
ParitoshKowli
New Contributor

I tested the sample application with latest version of ArcGIS JavaScript API i.e. 3.11 and was able to print text element. So please update the version of ArcGIS JavaScript API to 3.11 and correct the following line:

var font = new Font("20px", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLDER,"Ariel");

Also refer following link that state "now print a map containing a graphic having attributes and a Text Symbol as its symbol" using ArcGIS JavaScript API 3.11.

What's new in Version 3.11 | Guide | ArcGIS API for JavaScript

View solution in original post

3 Replies
JohnChurchill
New Contributor III

I'm going to have to submit this as a bug.

0 Kudos
ParitoshKowli
New Contributor

I tested the sample application with latest version of ArcGIS JavaScript API i.e. 3.11 and was able to print text element. So please update the version of ArcGIS JavaScript API to 3.11 and correct the following line:

var font = new Font("20px", Font.STYLE_NORMAL, Font.VARIANT_NORMAL, Font.WEIGHT_BOLDER,"Ariel");

Also refer following link that state "now print a map containing a graphic having attributes and a Text Symbol as its symbol" using ArcGIS JavaScript API 3.11.

What's new in Version 3.11 | Guide | ArcGIS API for JavaScript

JohnChurchill
New Contributor III

Thanks. That fixed the problem!

0 Kudos