<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Esri print task , missing custom graphics on export webmap in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/esri-print-task-missing-custom-graphics-on-export/m-p/751579#M59</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an esri map, and a print task service , After loading the map , I have added custom graphics on my map , but when i tried to take the screenshot by using JavaScript Print Task (**esri.tasks.PrintTask**) , it is only printing the default map same as it is ArcGIS Server, not printing the programmatically added custom graphics. Here is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.exportWebMap=function(url,map,width,height){&lt;BR /&gt; &lt;BR /&gt; var deferred = new Deferred();&lt;BR /&gt; var printTask = new PrintTask(url);&lt;BR /&gt; var attrs={}; &lt;BR /&gt; var template = new PrintTemplate();&lt;BR /&gt; var mapWidth=map&amp;amp;&amp;amp;map.width?map.width:this.currentMap.width;&lt;BR /&gt; var mapHeight=map&amp;amp;&amp;amp;map.height?map.height:this.currentMap.height;&lt;BR /&gt; template.exportOptions = {&lt;BR /&gt; width: mapWidth,&lt;BR /&gt; height: mapHeight,&lt;BR /&gt; dpi: 96 &lt;BR /&gt; };&lt;BR /&gt; template.format = "JPG";&lt;BR /&gt; template.layout = "MAP_ONLY",&lt;BR /&gt; template.preserveScale = false;&lt;BR /&gt; template.showLabels = true;&lt;BR /&gt; template.showAttribution = false;&lt;BR /&gt; &lt;BR /&gt; template.layoutOptions = {&lt;BR /&gt; "legendLayers": [], // empty array means no legend&lt;BR /&gt; "scalebarUnit": "Miles",&lt;BR /&gt; "copyrightText": "&amp;lt;div&amp;gt;xxx&amp;lt;/div&amp;gt;",&lt;BR /&gt; }&lt;BR /&gt; var params = new PrintParameters();&lt;BR /&gt; &lt;BR /&gt; params.map = map||this.currentMap;&lt;BR /&gt; params.template = template;&lt;BR /&gt; &lt;BR /&gt; printTask.execute(params, function(success){&lt;BR /&gt; deferred.resolve(success);&lt;BR /&gt; }, &lt;BR /&gt; function(error){&lt;BR /&gt; deferred.resolve(error);&lt;BR /&gt; });&lt;BR /&gt; return deferred.promise;&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Jul 2017 12:39:45 GMT</pubDate>
    <dc:creator>AhammadAli2</dc:creator>
    <dc:date>2017-07-03T12:39:45Z</dc:date>
    <item>
      <title>Esri print task , missing custom graphics on export webmap</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/esri-print-task-missing-custom-graphics-on-export/m-p/751579#M59</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an esri map, and a print task service , After loading the map , I have added custom graphics on my map , but when i tried to take the screenshot by using JavaScript Print Task (**esri.tasks.PrintTask**) , it is only printing the default map same as it is ArcGIS Server, not printing the programmatically added custom graphics. Here is my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.exportWebMap=function(url,map,width,height){&lt;BR /&gt; &lt;BR /&gt; var deferred = new Deferred();&lt;BR /&gt; var printTask = new PrintTask(url);&lt;BR /&gt; var attrs={}; &lt;BR /&gt; var template = new PrintTemplate();&lt;BR /&gt; var mapWidth=map&amp;amp;&amp;amp;map.width?map.width:this.currentMap.width;&lt;BR /&gt; var mapHeight=map&amp;amp;&amp;amp;map.height?map.height:this.currentMap.height;&lt;BR /&gt; template.exportOptions = {&lt;BR /&gt; width: mapWidth,&lt;BR /&gt; height: mapHeight,&lt;BR /&gt; dpi: 96 &lt;BR /&gt; };&lt;BR /&gt; template.format = "JPG";&lt;BR /&gt; template.layout = "MAP_ONLY",&lt;BR /&gt; template.preserveScale = false;&lt;BR /&gt; template.showLabels = true;&lt;BR /&gt; template.showAttribution = false;&lt;BR /&gt; &lt;BR /&gt; template.layoutOptions = {&lt;BR /&gt; "legendLayers": [], // empty array means no legend&lt;BR /&gt; "scalebarUnit": "Miles",&lt;BR /&gt; "copyrightText": "&amp;lt;div&amp;gt;xxx&amp;lt;/div&amp;gt;",&lt;BR /&gt; }&lt;BR /&gt; var params = new PrintParameters();&lt;BR /&gt; &lt;BR /&gt; params.map = map||this.currentMap;&lt;BR /&gt; params.template = template;&lt;BR /&gt; &lt;BR /&gt; printTask.execute(params, function(success){&lt;BR /&gt; deferred.resolve(success);&lt;BR /&gt; }, &lt;BR /&gt; function(error){&lt;BR /&gt; deferred.resolve(error);&lt;BR /&gt; });&lt;BR /&gt; return deferred.promise;&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 12:39:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/esri-print-task-missing-custom-graphics-on-export/m-p/751579#M59</guid>
      <dc:creator>AhammadAli2</dc:creator>
      <dc:date>2017-07-03T12:39:45Z</dc:date>
    </item>
  </channel>
</rss>

