<?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: Print widget - Problem with custom request parameters in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1033306#M71942</link>
    <description>&lt;P&gt;Hmm, doesn't this mean we would need to switch from the Print widget to PrintTask, or is there some way the PrintParameters can be applied to the Print widget? It seems like lots of extra work to switch to PrintTask and according to some samples I found we would lose the widget window that includes all the file formats/layout options etc.&lt;/P&gt;&lt;P&gt;It has been extremely simple just to add the extra parameters to the Print widgets' printServiceUrl.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 09:43:57 GMT</pubDate>
    <dc:creator>JerePallaskorpi</dc:creator>
    <dc:date>2021-03-05T09:43:57Z</dc:date>
    <item>
      <title>Print widget - Problem with custom request parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1032784#M71925</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We recently updated our ArcGIS JS API version from 4.13 to 4.18 and there seems to be a problem with sending custom request parameters for Print widgets' printServiceUrl.&lt;/P&gt;&lt;P&gt;Basically we have our own proxy/api ("/api/GPServer/Export Web Map") for printing, and we require some extra request parameters so we can highlight the selected features on the map for the print.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const print = new Print({
	view,
	printServiceUrl: "/api/GPServer/Export Web Map?customPrintParameters={example: parameters}"
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We pass extra request parameters to Print widgets' printServiceUrl, but the request parameter (customPrintParameters) is always null in our backend api when the print widget is used within the app.&lt;/P&gt;&lt;P&gt;This was working fine with v4.13. Is this behaviour intended and is there some other way the custom request parameters could be sent to our backend with the Print widget?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 08:25:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1032784#M71925</guid>
      <dc:creator>JerePallaskorpi</dc:creator>
      <dc:date>2021-03-04T08:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Print widget - Problem with custom request parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1032916#M71935</link>
      <description>&lt;P&gt;Can you add them to the PrintParameters.extraParameters property?&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintParameters.html#extraParameters" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-PrintParameters.html#extraParameters&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That should be how custom parameters are sent. I'm surprised it worked before in the print service url, technically I don't think it should have.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 16:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1032916#M71935</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-03-05T16:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Print widget - Problem with custom request parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1033306#M71942</link>
      <description>&lt;P&gt;Hmm, doesn't this mean we would need to switch from the Print widget to PrintTask, or is there some way the PrintParameters can be applied to the Print widget? It seems like lots of extra work to switch to PrintTask and according to some samples I found we would lose the widget window that includes all the file formats/layout options etc.&lt;/P&gt;&lt;P&gt;It has been extremely simple just to add the extra parameters to the Print widgets' printServiceUrl.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 09:43:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1033306#M71942</guid>
      <dc:creator>JerePallaskorpi</dc:creator>
      <dc:date>2021-03-05T09:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Print widget - Problem with custom request parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1034551#M71986</link>
      <description>&lt;DIV&gt;We are considering this for a future enhancement of the Print widget. In the meantime:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Would templateOptions suffice for this use case?&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#templateOptions" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print.html#templateOptions&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If not, it looks like the print() method on the ViewModel can pass a PrintTemplate:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#print" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Print-PrintViewModel.html#print&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 Mar 2021 17:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/print-widget-problem-with-custom-request/m-p/1034551#M71986</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2021-03-09T17:20:57Z</dc:date>
    </item>
  </channel>
</rss>

