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
I also asked this here
Solved! Go to Solution.
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
I'm going to have to submit this as a bug.
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
Thanks. That fixed the problem!