title: convert html table to pdf in angular js using jspdf
body: <p>I have used FileSaver.js, jspdf.plugin.table.js and jspdf.js files.
  My code in controller is below.</p>
  
  <pre><code>$scope.exportPdf = function(sampletable){
       alert('pppp');
  
     var tbldata = [], fontSize = 8, height = 0, doc;
     doc = new jsPDF('p', 'pt', 'a4', true);
     doc.setFont("times", "normal");
     doc.setFontSize(fontSize);
           tbldata = [];
     tbldata = doc.tableToJson('sampletable');
     height = doc.drawTable(tbldata, {
  
     });
  
  
    // doc.text(120, height + 20, 'Congrats!');
     doc.save("dwnld.pdf");
    }
  </code></pre>
  
  <p>I have table with image. bt while i have image my code is not working. If i have the table with image it is not working. my table is as below.</p>
  
  <pre><code>&lt;style&gt;
                              .tab{
                                  margin-left:10%;
                                  }
  
                                          .table1, .tr1 ,.td1{
                                                              border: 1px solid black;
  
                                                          }
                                                  th, td {
                                                              padding: 5px;
                                                          }
                                      &lt;/style&gt;
  &lt;table border="1" style="width:80%" class="table1 tab" ng-repeat="m in empname" id="sampletable"&gt;
   &lt;tr class="tr1"&gt; 
     &lt;td class="td1"&gt;Name&lt;/td&gt;
      &lt;td class="td1"&gt;uu&lt;/td&gt;     
      &lt;td class="td1"&gt;hh&lt;/td&gt;
     &lt;td class="td1"&gt;uu&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="tr1"&gt;
      &lt;td class="td1"&gt;uuu&lt;/td&gt;
      &lt;td class="td1"&gt;hhh&lt;/td&gt;        
      &lt;td class="td1"&gt;iit&lt;/td&gt;
      &lt;td class="td1"&gt;iii&lt;/td&gt;
                                                                  &lt;/tr&gt;
                                                                  &lt;tr class="tr1"&gt;
      &lt;td class="td1"&gt;Nojjjjjj&lt;/td&gt;
      &lt;td class="td1"&gt;22&lt;/td&gt;     
      &lt;td class="td1"&gt;yyyyyy&lt;/td&gt;
      &lt;td class="td1"&gt;21&lt;/td&gt;
      &lt;/tr&gt;
  
   &lt;tr class="tr1"&gt;
    &lt;th height="50" colspan="4"&gt;yyyyyyyyyy&lt;/th&gt;   
   &lt;/tr&gt;
   &lt;tr class="tr1"&gt;
      th colspan="4" class="td1"&gt;hhhhhhhh&lt;/th&gt;
     &lt;/tr&gt;
  
   &lt;tr class="tr1"  &gt;
     &lt;td class="td1" colspan="2"&gt;hh&lt;/td&gt;
  &lt;td class="td1" colspan="2"&gt;hh&lt;/td&gt;
    &lt;/tr&gt;
   &lt;tr class="tr1"&gt;
    &lt;td class="td1" colspan="2"&gt;hhhhh&lt;/td&gt;&lt;td class="td1" colspan="2"&gt;888&lt;/td&gt;
                                                           &lt;/tr&gt;
  
    &lt;tr class="tr1"&gt;
      &lt;th height="100" colspan="4" &gt;ggggggggggggggggggggg bbbbbbbbbbbb&lt;/th&gt;   
                                                                  &lt;/tr&gt;
  
  
                                              &lt;/table&gt; 
  </code></pre>
  
  <p>Iam getting the pdf file. bt it is not what i need exactly. Plz help me to solve this issue..</p>