<?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 Re: Can I show the legend on a printout if using AGSJS TOC Widget? Print Questions. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-show-the-legend-on-a-printout-if-using-agsjs/m-p/333832#M30833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1.&amp;nbsp; our API doesn't know anything about the TOC widget, but you should definitely be able to instantiate an array of legendLayers and pass it to the print widget to populate the legend in your printout.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; i don't know of a way to remove credits from the printout (perhaps this is on purpose?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; because the dimensions of the printout are typically different than your layout template, my understanding is that you have to choose whether to attempt to preserve scale or extent at the expense of the other.&amp;nbsp; are you seeing something else?&amp;nbsp; if so, can you post a sample that references public data?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 14:56:51 GMT</pubDate>
    <dc:creator>JohnGravois</dc:creator>
    <dc:date>2013-03-15T14:56:51Z</dc:date>
    <item>
      <title>Can I show the legend on a printout if using AGSJS TOC Widget? Print Questions.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-show-the-legend-on-a-printout-if-using-agsjs/m-p/333831#M30832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A few print related questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Is it possible to show the legend on a printout if I'm using the AGSJS TOC widget? Setting legendLayers doesn't seem to work, which I assume is because I'm not using it anywhere else in my app.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Is it possible to remove the credits from the printout? I'm using v3.2. The template mxd doesn't reference them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Finally, How do I capture the same extent of my map in my printout? It looks like the map is displaying at the same extent, but the print area is smaller than my screen, so that may be the issue. How can I get the print to look exactly like the screen? I've tried preserveScale at both true and false and the result is the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.require("esri.dijit.Print");

function initPrinter() {

 var printTemplates = [{
&amp;nbsp; label: "Map Only",
&amp;nbsp; format: "png32",
&amp;nbsp; layout: "MAP_ONLY",
&amp;nbsp; exportOptions: {
&amp;nbsp;&amp;nbsp;&amp;nbsp; width: map.width,
&amp;nbsp;&amp;nbsp;&amp;nbsp; height: map.height,
&amp;nbsp;&amp;nbsp;&amp;nbsp; dpi: 96
&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }, {
&amp;nbsp; label: "Portrait",
&amp;nbsp; format: "PDF",
&amp;nbsp; layout: "Letter ANSI A Portrait",
&amp;nbsp; layoutOptions: {
&amp;nbsp;&amp;nbsp;&amp;nbsp; titleText: "my layout",
&amp;nbsp;&amp;nbsp;&amp;nbsp; authorText: "GIS Team",
&amp;nbsp;&amp;nbsp;&amp;nbsp; copyrightText: "Copyright 2013",
&amp;nbsp;&amp;nbsp;&amp;nbsp; scalebarUnit: "Miles"
&amp;nbsp; }
&amp;nbsp; }, {
&amp;nbsp; label: "Landscape",
&amp;nbsp; format: "PDF",
&amp;nbsp; layout: "Letter ANSI A Landscape",
&amp;nbsp; layoutOptions: {
&amp;nbsp;&amp;nbsp; titleText: "my layout",
&amp;nbsp;&amp;nbsp; authorText: GIS Team",
&amp;nbsp;&amp;nbsp; copyrightText: "Copyright 2013",
&amp;nbsp;&amp;nbsp; scalebarUnit: "Miles"
&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; }];

 // print dijit
 var printer = new esri.dijit.Print({
&amp;nbsp; map: map,
&amp;nbsp; templates: printTemplates,
&amp;nbsp; url: "path/to/my/Export%20Web%20Map%20Task"
&amp;nbsp; }, dojo.byId("printButtonDiv"));&amp;nbsp;&amp;nbsp; 
 
 printer.startup();
&amp;nbsp; 
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 13:35:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-show-the-legend-on-a-printout-if-using-agsjs/m-p/333831#M30832</guid>
      <dc:creator>CraigMcDade</dc:creator>
      <dc:date>2013-03-15T13:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can I show the legend on a printout if using AGSJS TOC Widget? Print Questions.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-show-the-legend-on-a-printout-if-using-agsjs/m-p/333832#M30833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;1.&amp;nbsp; our API doesn't know anything about the TOC widget, but you should definitely be able to instantiate an array of legendLayers and pass it to the print widget to populate the legend in your printout.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; i don't know of a way to remove credits from the printout (perhaps this is on purpose?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; because the dimensions of the printout are typically different than your layout template, my understanding is that you have to choose whether to attempt to preserve scale or extent at the expense of the other.&amp;nbsp; are you seeing something else?&amp;nbsp; if so, can you post a sample that references public data?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 14:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/can-i-show-the-legend-on-a-printout-if-using-agsjs/m-p/333832#M30833</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-03-15T14:56:51Z</dc:date>
    </item>
  </channel>
</rss>

