<?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 opening PDF created with secure data and print services in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-opening-pdf-created-with-secure-data-and/m-p/331514#M30655</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know there are several threads out there for printing secure services, but I haven't found one yet that describes what I'm experiencing.&amp;nbsp; I have a created a secure print service following the instructions in the help.&amp;nbsp; We have secured it.&amp;nbsp; In the code, there is a call to that services as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14139104674696497 jive_text_macro" jivemacro_uid="_14139104674696497"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var printTask = new esri.tasks.PrintTask(printServiceUrl,printParams);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred = printTask.execute(printParams);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred.addCallback(function (response){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var d = new Date();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var dateTime =&amp;nbsp; d.getTime(); &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var outputUrl = response.url + '?time=' + dateTime;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status.innerHTML = "";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var select = dijit.byId("templateSelect");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectOptions = select.getOptions();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select.set("value", "Choose Print Format");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.open(outputUrl,"_blank");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;A PDF is getting created, we can see it in the output directory.&amp;nbsp; However we can't open it, we get an error 499, indicating that it needs a token.&amp;nbsp; If I look back through the webmap_as_JSON call to the print services, I can see the token that's generated.&amp;nbsp; If I append it as an argument to the end of my PDF that's created, then I can view the PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, is there a way to capture the token programmatically so I can pass it to the PDF?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Oct 2014 16:56:12 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2014-10-21T16:56:12Z</dc:date>
    <item>
      <title>Problem opening PDF created with secure data and print services</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-opening-pdf-created-with-secure-data-and/m-p/331514#M30655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know there are several threads out there for printing secure services, but I haven't found one yet that describes what I'm experiencing.&amp;nbsp; I have a created a secure print service following the instructions in the help.&amp;nbsp; We have secured it.&amp;nbsp; In the code, there is a call to that services as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14139104674696497 jive_text_macro" jivemacro_uid="_14139104674696497"&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var printTask = new esri.tasks.PrintTask(printServiceUrl,printParams);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred = printTask.execute(printParams);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deferred.addCallback(function (response){&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var d = new Date();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var dateTime =&amp;nbsp; d.getTime(); &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var outputUrl = response.url + '?time=' + dateTime;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status.innerHTML = "";&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var select = dijit.byId("templateSelect");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var selectOptions = select.getOptions();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select.set("value", "Choose Print Format");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.open(outputUrl,"_blank");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;A PDF is getting created, we can see it in the output directory.&amp;nbsp; However we can't open it, we get an error 499, indicating that it needs a token.&amp;nbsp; If I look back through the webmap_as_JSON call to the print services, I can see the token that's generated.&amp;nbsp; If I append it as an argument to the end of my PDF that's created, then I can view the PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, is there a way to capture the token programmatically so I can pass it to the PDF?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 16:56:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problem-opening-pdf-created-with-secure-data-and/m-p/331514#M30655</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-10-21T16:56:12Z</dc:date>
    </item>
  </channel>
</rss>

