title: How to export the Html Tables data into PDF using Jspdf
body: <p>How do I export the tables in HTML page to PDF. I have done some sample data but  I am unable to load the HTML table list into PDF, Please can any one help me in loading the Tables into PDF.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;title&gt;html2canvas example&lt;/title&gt;
          &lt;script type="text/javascript" src="js/jquery/jquery-1.7.1.min.js"&gt;&lt;/script&gt;    
          &lt;script type="text/javascript" src="js/jspdf.js"&gt;&lt;/script&gt;    
          &lt;script type="text/javascript" src="libs/FileSaver.js/FileSaver.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/jspdf.plugin.standard_fonts_metrics.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/jspdf.plugin.split_text_to_size.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/jspdf.plugin.from_html.js"&gt;&lt;/script&gt;    
  
          &lt;script type="text/javascript"&gt;
              $(document).ready(function() { 
                  var specialElementHandlers = {
                      '#editor': function(element, renderer) { return true; }
                  };
  
                  $('#cmd').click(function() {
                      var doc = new jsPDF();
  
                      doc.fromHTML($('#target').html(), 15, 15, {
                          'width': 170,'elementHandlers': specialElementHandlers
                      });
  
                      doc.save('sample-file.pdf');
                  });  
              });
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body id="target"&gt;
          &lt;div id="content"&gt;
              &lt;h3&gt;Hello, this is a H3 tag&lt;/h3&gt;
  
              &lt;a class="upload"&gt;Upload to Imgur&lt;/a&gt;    
              &lt;h2&gt;this is &lt;b&gt;bold&lt;/b&gt; &lt;span style="color:red"&gt;red&lt;/span&gt;&lt;/h2&gt;
  
              &lt;table border="1"&gt;
                  &lt;tr&gt;
                      &lt;th&gt;Header 1&lt;/th&gt;
                      &lt;th&gt;Header 2&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;row 1, cell 1&lt;/td&gt;
                      &lt;td&gt;row 1, cell 2&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;row 2, cell 1&lt;/td&gt;
                      &lt;td&gt;row 2, cell 2&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
          &lt;/div&gt;
  
          &lt;button id="cmd"&gt;generate PDF&lt;/button&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/y2b7Q/327/" rel="noreferrer">http://jsfiddle.net/y2b7Q/327/</a></p>