In the most recent version of the HTML tree grid  we have introduced the PDF export. In addition to this we included the FileSaver library (https://github.com/eligrey/FileSaver.js/)  which makes it a lot easier for the browser to download file.


Prior to the introduction of this library we had multiple mechanisms for our exported files to be downloaded to the client.  A majority of our export code basically built a string and then  creates a file with that string.  This holds true for Excel html/xml word and text exports.  The PDF export is an exception in that it creates a binary file and uses file saver to save the file.  But for the most part the mechanism used is to build a string and to save it to a file.


There is a flag on the export options called enableLocalFilePersistence. this flag is defaulted to true.  When this flag is true and FileSaver exists  then our product uses FileSaver  to persist a file to disk . The advantage of FileSaver is that it doesn't require Flash  and it doesn't require any custom button used to download the file.  so if you include the following script tag  in your  HTML you should automatically get file saver because PDF scripts include the file saver scripts.


<script type="text/javascript" src="http://htmltreegrid.com/demo/external/js/thirdparty/jspdf-combined.js"></script>


If you don't include the above script, the prior version of the download mechanism that used Downloadify library will be used to download the file. The limitation with this is that  it uses the flash player and has its custom UI to download a file which looks like this. But the advantage is that it opens up a browse window that allows our customers to choose where to save the file.  


For those of our customers who want to use the older version just make sure you don’t have the following script tag included.

<script type="text/javascript" src="http://htmltreegrid.com/demo/external/js/thirdparty/jspdf-combined.js"></script>.



Finally there's one more mechanism  that doesn't rely on any client-side library.  this is the server echo method  and we talk about this  in an older blog post here http://blog.htmltreegrid.com/post/Excel-Word-and-Html-Export-and-the-Echo-URL.aspx

This should actually no longer be used, Because it affords no major advantages  over the  FileSaver method.  many of our customers are older versions of the product are probably using this.  if you're one of them please consider using the file saver method.  all you have to do is to set enableLocalFilePersistence  back to true  and include  the file saver library  either directly from the file saver location  or by importing JS PDF library

 <script type="text/javascript" src="http://htmltreegrid.com/demo/external/js/thirdparty/jspdf-combined.js"></script>