Use for Print a DynamicMapService

Discussion created by Schnoerkel on Dec 11, 2012
Hey I use to display a map a tiledMapservice but if i print the image is terrible -> 96 dpi. Now I want to change the basemap for printing to dynamic with 300 dpi. If i take the print Parameters send by post it all works well by changing the url of the layer. In the map i make it:

var printurl = "";
var params = new esri.tasks.PrintParameters();
var printmapvar = map;
printmapvar._layers.basemap.url = ""; = printmapvar;   
var template = new esri.tasks.PrintTemplate();
template.exportOptions = {
       /*width: 680.31,
       height: 755.91,
       dpi: 96*/
       width: 2125.98,
       height: 2362.2,
       dpi: 300
template.format = "jpg";
template.layout = "MAP_ONLY";
template.preserveScale = true;
params.template = template;
printTask = new esri.tasks.PrintTask(printurl); 
                                                           map._layers.basemap.url = "";
var UrlToMapImage = value.url;
       map._layers.basemap.url = "";

Now my question is there an more effective way to get the Image of the map? I also can have custom graphics in multiple graphic layers....