AnsweredAssumed Answered

Problems using Print

Question asked by gopre400 on Feb 4, 2016
Latest reply on Feb 4, 2016 by gopre400

Hi, I'm trying to print a map using "esri/dijit/Print" I am adding a DynamicServiceLayer to a base map. When I click on the print button it flashes then nothing happens. I added a few handlers. print-start fires, print-complete does NOT fire, error does NOT fire. So the print starts but does not complete or does not throw an error.


I did try adding the layer as a FeatureLayer: I was able to print the base however the added feature layer did not print despite it being visible.

Map Service is located on ArcGIS Server 10.3.1 What am I missing?


here is how I add dynamic layer: = new Map("map", {                

basemap: "streets",                

center: [-117.42330, 47.751103],               

zoom: 18           


var roadLayer = new esri.layers.ArcGISDynamicMapServiceLayer("", {                

id: "roadLayer",                

visible: true            

});    [roadLayer]);           

roadLayer.on("load", function () {             });            



Here is print Dijit

app.printUrl = "";            

app.printer = new Print({                


"templates": [{                    

label: "Map",                   

format: "PDF",                   

layout: "MAP_ONLY",                   

exportOptions: {                        

width: 500,                        

height: 400,                       

dpi: 96                    




label: "Layout",                    

format: "PDF",                    

layout: "A4 Portrait",                   

layoutOptions: {                        

titleText: "My Print",                        

authorText: "esri",                        

copyrightText: "My Company",                        

scalebarUnit: "Miles",                   



url: app.printUrl           





app.printer.on('error', function (evt) {                

alert('The url to the print image is : ' + evt.result.url);           



app.printer.on('print-complete', function (evt) {                

alert('The url to the print image is : ' + evt.result.url);            



app.printer.on('print-start', function (evt) {