Anthony,
I did not develop a specific widget for clientside printing I just added code to custom widget that use this technique:
Currently I use the PrintTask to print a JPG of the map and then use that JPG in the report that I am generating clientside |
A code snippet:
var printTask = new PrintTask('..../ExportWebMap/GPServer/Export_Web_Map');
var template = new PrintTemplate();
this.imgHeight = (740/oWid) * oHgt;
template.exportOptions = {
width: 1542,
height: (1542/oWid) * oHgt,
dpi: 200
};
template.format = "jpg";
template.layout = "MAP_ONLY";
template.preserveScale = false;
template.showAttribution = false;
var params = new PrintParameters();
params.map = this.map;
params.template = template;
printTask.execute(params, lang.hitch(this, this.printResult));
printResult: function(rsltURL){
var mapImg = domConstruct.toDom('<img src="'+rsltURL.url+'" border="0" style="width:740px;height:'+this.imgHeight+'px;"/>');
domConstruct.place(mapImg, dom.byId('mapImgDiv'), 'replace');
},