title: How to print a specific extent of an ArcGis Map?
body: <p>I'm trying to print a specific zone on an Arcgis maps with the JS API (not the extend that is displayed).</p>
  
  <p>I didn't find any method or option to do this so I tried to change the extend and then print the map :</p>
  
  <pre><code>var extent = new esri.geometry.Extent(
      -620526.0922336339, 
      5993991.149960931, 
      108988.90572005256, 
      6293624.300838808, 
      myMap.spatialReference
  );
  
  myMap.setExtent(extent, true).then(function() {
      console.log('setExtend is finished');
  
      var template = new esri.tasks.PrintTemplate();
      template.exportOptions = {
          width : 500,
          height : 500
      };
      template.format = 'jpg';
      template.layout = 'MAP_ONLY';
  
      var params = new esri.tasks.PrintParameters();
      params.map = myMap;
      params.template = template;
  
      var printTask = new esri.tasks.PrintTask(urlToThePrintServer);
      printTask.execute(params);
  });
  </code></pre>
  
  <p>Since setExtent is asynchonous and return a defered I have to use the 'then' method.</p>
  
  <p>I can see the map moving but the defered doesn't seem to works ... (I don't see the console.log()).</p>
  
  <ul>
  <li>is there another way to print a specific extend of a map ?</li>
  <li>if not why is the 'then' method never called ?</li>
  </ul>
  
  <p>(I'm using the 3.12 JS API)</p>