var date = new Date(); var layoutOptions = { titleText: "Map Title", scalebarUnit: 'Miles', authorText: "Author Name", copyrightText: "2012 Copyright", legendLayers: [] }; var layout = document.getElementById("PRINT_LAYOUT"); var format = document.getElementById("PRINT_FORMAT"); var printTemplate = new esri.tasks.PrintTemplate(); printTemplate.format = format.options[format.selectedIndex].value; printTemplate.layout = layout.options[layout.selectedIndex].value; printTemplate.layoutOptions = layoutOptions; printTemplate.preserveScale = true; graphicsLayer.clear(); var printParams = new esri.tasks.PrintParameters(); printParams.map = map; printParams.outSpatialReference = map.spatialReference; printParams.template = printTemplate; var printUrl = "...myUrl..."; var printTask = new esri.tasks.PrintTask(printUrl); printTask.execute(printParams, function (result) { PrintButton.src = oldSrc; window.open(result.url + "?timestamp=" + (new Date().getTime())); }, function (error) { PrintButton.src = oldSrc; var a = error; alert(a); });
Did you in the end found a solution? I would be very interested to see it since i'm running into the same problem
Did you verify if your server is still running?. I ran into a similar issue and i had to restart the arcgis server.