title: Downloading data tables from HTML as image
body: <p>I have a data table as below:</p>
  
  <pre><code>&lt;table id="example2" class="table table-bordered table-striped table-fixed"&gt;
      &lt;thead&gt;
          &lt;th&gt;Key Account&lt;/th&gt;
          &lt;th&gt;Key Account Code&lt;/th&gt;
          &lt;th&gt;Potential Value&lt;/th&gt;
          &lt;th&gt;Sales Value&lt;/th&gt;
          &lt;th&gt;Penetration %&lt;/th&gt;
          &lt;th&gt;Potential (H/M/L)&lt;/th&gt;
          &lt;th&gt;Penetration (H/M/L)&lt;/th&gt;
      &lt;/thead&gt;
      &lt;?php echo "Some data from database here";?&gt;   
  &lt;/table&gt;
  </code></pre>
  
  <p>and I have a button as</p>
  
  <pre><code>&lt;button id="click" &gt;Export Image &lt;/button&gt;
  </code></pre>
  
  <p>How to download the above data table as image after clicking the button?</p>