<?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 Problem with print widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365839#M33923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have custom web application using ArcGIS Api for Javascript 3.32 and trying to implement export map. I am using the same code as here: &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/widget_print_esri_request.html" title="https://developers.arcgis.com/javascript/3/jssamples/widget_print_esri_request.html"&gt;Print templates with esri.request | ArcGIS API for JavaScript 3.32&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But always getting this error:&lt;/P&gt;&lt;P&gt;TypeError: Cannot read property '3' of null&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at new h (init.js:457)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at b.hasSameOrigin (init.js:731)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at init.js:731&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.some (init.js:70)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.b.canUseXhr (init.js:731)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at A (init.js:958)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at f (init.js:966)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at H (init.js:974)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at init.js:974&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at c (init.js:104)&lt;/P&gt;&lt;P&gt;As a Print Task I am using this: &lt;A class="link-titled" href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"&gt;Task: Export Web Map Task&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure where is the problem. Any help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Jun 2020 18:17:01 GMT</pubDate>
    <dc:creator>PavleJovanov</dc:creator>
    <dc:date>2020-06-06T18:17:01Z</dc:date>
    <item>
      <title>Problem with print widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365839#M33923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have custom web application using ArcGIS Api for Javascript 3.32 and trying to implement export map. I am using the same code as here: &lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/widget_print_esri_request.html" title="https://developers.arcgis.com/javascript/3/jssamples/widget_print_esri_request.html"&gt;Print templates with esri.request | ArcGIS API for JavaScript 3.32&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But always getting this error:&lt;/P&gt;&lt;P&gt;TypeError: Cannot read property '3' of null&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at new h (init.js:457)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at b.hasSameOrigin (init.js:731)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at init.js:731&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.some (init.js:70)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Object.b.canUseXhr (init.js:731)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at A (init.js:958)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at f (init.js:966)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at H (init.js:974)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at init.js:974&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at c (init.js:104)&lt;/P&gt;&lt;P&gt;As a Print Task I am using this: &lt;A class="link-titled" href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"&gt;Task: Export Web Map Task&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure where is the problem. Any help?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jun 2020 18:17:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365839#M33923</guid>
      <dc:creator>PavleJovanov</dc:creator>
      <dc:date>2020-06-06T18:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with print widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365840#M33924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couple suggestions:&lt;/P&gt;&lt;P&gt;1) can you share an app on something like codepen? the minimal code required to reproduce the issue, it's real tricky to figure this out from just the error message&lt;/P&gt;&lt;P&gt;2) try using the ArcGIS Online utility print service. sampleServer6 really isn't meant for anything other than our samples:&amp;nbsp;&lt;A class="link-titled" href="https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" title="https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"&gt;https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) have you tried 4x? You might find it a lot easier and more powerful:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/widgets-print/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/widgets-print/index.html"&gt;Print widget | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2020 22:23:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365840#M33924</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-06-09T22:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with print widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365841#M33925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply Noah. I found where the error was. I am using secure services from my ArcGIS Online Organization and using token to authorize them in the code. When I authorize with IdentityManager like this then I have problem with print service:&lt;/P&gt;&lt;P&gt;var tokenMap = {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'server': MapServiceUrl,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;'token': myToken,&lt;BR /&gt;};&lt;BR /&gt;IdentityManager.registerToken(tokenMap);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I use the token on this way and don't have problem with the print service:&lt;/P&gt;&lt;P&gt;var newTiledLayer = new ArcGISTiledMapServiceLayer(MapServiceUrl + "?token=" + myToken, {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;visible: false&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) About the print service, is it possible somehow to add my own Print Layouts? I have ArcGIS Online Organization and if I go to Organization -&amp;gt; Settings -&amp;gt; Utility Services here I have Printing but I can't add my print service and then add my Print Layouts. Is it possible with ArcGIS Online Organization to have my own Print Service with my Print Layouts or only possible for printing is to use yours with the default Print Layouts: &lt;A class="link-titled" href="https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" title="https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"&gt;https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 06:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365841#M33925</guid>
      <dc:creator>PavleJovanov</dc:creator>
      <dc:date>2020-06-10T06:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with print widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365842#M33926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, glad you figured out the printing issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For custom Print Layouts, you need an authoring tool like ArcGIS Pro, and ArcGIS Server to host the print service.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/printing-in-web-applications.htm" title="https://enterprise.arcgis.com/en/server/latest/create-web-apps/windows/printing-in-web-applications.htm"&gt;Printing in web applications—Documentation (10.7) | Documentation for ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2020 15:43:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-with-print-widget/m-p/365842#M33926</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2020-06-10T15:43:14Z</dc:date>
    </item>
  </channel>
</rss>

