title: Create pdf using jsPDF with formatted Table data
body: <p>I am able to generated PDF file from html table using this below script:
  But I am getting all the columns data are line by line. </p>
  
  <p><strong>Please help me to generate PDF file as a tabular formatted way.(with column border, margin or padding, headers ) in this script</strong></p>
  
  <p>I am used jsPDF lib script to generate a html table to PDF .</p>
  
  <pre><code> var pdf = new jsPDF('p', 'pt', 'letter')   
      , source = $('#TableId')[0] 
      , specialElementHandlers = {
          // element with id of "bypass" - jQuery style selector
          '#bypassme': function(element, renderer){           
              return true
          }
      }
  
      , margins = {
               top: 20,
               bottom: 20,
               left: 30,
               width: 922
           };
  
  
      pdf.fromHTML(
          source // HTML string or DOM elem ref.
          , margins.left // x coord
          , margins.top // y coord
          , {
              'width': margins.width // max width of content on PDF
              , 'elementHandlers': specialElementHandlers
          },
          function (dispose) {          
            pdf.save('Test.pdf');
          },
          margins
      )
  </code></pre>
  
  <p><strong>EDIT:</strong>    </p>
  
  <p>I have tried this <strong>sample</strong> below function too, but I am getting just empty pdf file.</p>
  
  <pre><code>function exportTabletoPdf()
  {
      var doc = new jsPDF('p','pt', 'a4', true);
      var header = [1,2,3,4];
      doc.table(10, 10, $('#test').get(0), header, {
      left:10,
      top:10,
      bottom: 10,
      width: 170,
      autoSize:false,
      printHeaders: true
      });
      doc.save('sample-file.pdf');
  }
  </code></pre>