title: jsPDF AutoTable rowspan/colspan from HTML table
body: <p>I'm using jsPDF AutoTable (<a href="https://github.com/simonbengtsson/jsPDF-AutoTable" rel="nofollow">https://github.com/simonbengtsson/jsPDF-AutoTable</a>).</p>
  
  <p>I have an HTML table with rowspan="2" and when the pdf is generated with this table, there is no rowspan="2" anymore :(</p>
  
  <p>I modify the plugin to add rowSpan attribute (see [[[[[ ADDED ]]]]] mark ) :</p>
  
  <pre><code>var autoTableHtmlToJson = function(table){
  
      var data = [],
          headers = [],
          header = table.rows[0],
          tableRow,
          rowData,
          i,
          j;
  
      for( i = 0 ; i &lt; header.cells.length;i++){
          headers.push( (typeof header.cells[i] !== "undefined") ? header.cells[i].textContent : "" );
      }
  
      for( i = 1 ; i &lt; table.rows.length; i++ ){
          tableRow = table.rows[i];
          rowData = [];
  
          for( j = 0; j &lt; header.cells.length; j++ ){
              if( typeof tableRow.cells[j] !== "undefined" ){
                  rowData.push({
                      value   : tableRow.cells[j].textContent,
                      rowSpan : tableRow.cells[j].rowSpan &lt;==== [[[[[ ADDED ]]]]]
                  });
              }
              else{
                  rowData.push({
                      value   : "",
                      rowSpan : 1 &lt;==== [[[[[ ADDED ]]]]]
                  });
              }
          }
          data.push( rowData );
      }
      return { columns:headers, data:data, rows:data }
  };
  </code></pre>
  
  <p>Then for each cell to draw I have :</p>
  
  <pre><code>    drawCell: function (cell, data) {
                      doc.rect(cell.x, cell.y, cell.width, cell.height * cell.raw.rowSpan, 'S');
                      doc.autoTableText(cell.raw.value,cell.x + cell.width / 2, cell.y + cell.height * cell.raw.rowSpan, {
                      halign: 'center',
                      valign: 'middle',
                      overflow: 'linebreak'
                  });
                  return false;
  
                  }
  </code></pre>
  
  <p>The rowSpan has the right value in drawCell but the pdf result is very wrong !
  The pdf have all data on the same line and I don't know why.
  Sorry I can't post the screenshot because I have not the reputation for.</p>