<?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 Generate report in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-report/m-p/353161#M32718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ! I'm making a webgis application and &amp;nbsp;I want to generate a report (pdf or word document format), using&amp;nbsp;a predefined template, and i want to populate it with data from attribute table. I must mention that I'm using javascript api and the application will be hosted on github, so I don't have a server.&amp;nbsp;Is there a solution to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Mar 2017 16:00:56 GMT</pubDate>
    <dc:creator>MateiAlexandra_Ioana</dc:creator>
    <dc:date>2017-03-22T16:00:56Z</dc:date>
    <item>
      <title>Generate report</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-report/m-p/353161#M32718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ! I'm making a webgis application and &amp;nbsp;I want to generate a report (pdf or word document format), using&amp;nbsp;a predefined template, and i want to populate it with data from attribute table. I must mention that I'm using javascript api and the application will be hosted on github, so I don't have a server.&amp;nbsp;Is there a solution to do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 16:00:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-report/m-p/353161#M32718</guid>
      <dc:creator>MateiAlexandra_Ioana</dc:creator>
      <dc:date>2017-03-22T16:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: Generate report</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-report/m-p/353162#M32719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I know there isn't anything in the Esri JavaScript API to help you with this directly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In JavaScript you can write text to a blob and save the blob as a file. &amp;nbsp;There are lot of &lt;A href="http://stackoverflow.com/questions/13405129/javascript-create-and-save-file"&gt;hacky ways to do this in JavaScript&lt;/A&gt;&amp;nbsp;(an alternate approach is&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/2897619/using-html5-javascript-to-generate-and-save-a-file"&gt;this&lt;/A&gt;). &amp;nbsp;None of these&amp;nbsp;are particularly elegant&amp;nbsp;(at least that I'm aware of). &amp;nbsp;Check out the JavaScript File and Blob classes or data URI encoding for more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also use something like &lt;A href="https://github.com/eligrey/FileSaver.js"&gt;this&lt;/A&gt;, which should simplify things and support more (all?) browsers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you're interested in .docx and/or&amp;nbsp;pdf you're probably going to want to look for some other&amp;nbsp;libraries, unless you want to learn the formats for those kinds of files and construct them manually. &lt;A href="http://pdfkit.org/"&gt;This&lt;/A&gt;&amp;nbsp;looks promising for pdfs. &amp;nbsp;It looks like it allows you to write text and canvas to a pdf.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general the file support in JavaScript is kind of a mess. &amp;nbsp;It's not hard to write something to a text file and "download" it to the user's file system, but anything other than that and I suspect you're going to have to pull in some libraries.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 20:26:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/generate-report/m-p/353162#M32719</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-03-22T20:26:11Z</dc:date>
    </item>
  </channel>
</rss>

