title: DataTable, export to pdf is not working properly with two headers and colspan
body: <p>I am using a data table to display my data and I want to export them to pdf.</p>
  
  <p>I followed steps listed in <a href="https://datatables.net/extensions/buttons/examples/initialisation/export.html" rel="noreferrer">example given in this link</a>.</p>
  
  <p>I am having a table in which I want two headers and out the two headers, one header having colspan i.e. as shown below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;th colspan=3&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>So, when I try to export the table to pdf, it gives me only one header and that too having full column description.
  My code snippet with all the required CSS and JS files is as below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdn.datatables.net/1.10.11/css/dataTables.bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;link rel="stylesheet" href="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css"&gt;
  &lt;link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.1.2/css/buttons.dataTables.min.css"&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.12.0.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.datatables.net/buttons/1.1.2/js/dataTables.buttons.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="http://cdn.datatables.net/buttons/1.1.2/js/buttons.flash.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.datatables.net/buttons/1.1.2/js/buttons.html5.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdn.datatables.net/buttons/1.1.2/js/buttons.print.min.js"&gt;&lt;/script&gt;
  
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('#dataTable').DataTable( {
              dom: 'Bfrtip',
              buttons: [
                  'copy', 'csv', 'excel', 'pdf', 'print'
              ]
          } );
      } );
  &lt;/script&gt;
  
  &lt;table id="dataTable" cellspacing="0" width="auto"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
              &lt;th colspan = 3&gt;&lt;/th&gt;
              &lt;th colspan = 3&gt;IMP values&lt;/th&gt;
              &lt;/tr&gt;
              
              &lt;tr&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Position&lt;/th&gt;
                  &lt;th&gt;Office&lt;/th&gt;
                  &lt;th&gt;Age&lt;/th&gt;
                  &lt;th&gt;Start date&lt;/th&gt;
                  &lt;th&gt;Salary&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          
          &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt;Tiger Nixon&lt;/td&gt;
                  &lt;td&gt;System Architect&lt;/td&gt;
                  &lt;td&gt;Edinburgh&lt;/td&gt;
                  &lt;td&gt;61&lt;/td&gt;
                  &lt;td&gt;2011/04/25&lt;/td&gt;
                  &lt;td&gt;$320,800&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td&gt;Garrett Winters&lt;/td&gt;
                  &lt;td&gt;Accountant&lt;/td&gt;
                  &lt;td&gt;Tokyo&lt;/td&gt;
                  &lt;td&gt;63&lt;/td&gt;
                  &lt;td&gt;2011/07/25&lt;/td&gt;
                  &lt;td&gt;$170,750&lt;/td&gt;
              &lt;/tr&gt;
            &lt;/tbody&gt;
      &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The image below shows, table as seen in the browser
  <a href="https://i.stack.imgur.com/VNUIJ.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/VNUIJ.jpg" alt="The table in the browser"></a></p>
  
  <p>The image below shows, table as seen after exported to pdf
  <a href="https://i.stack.imgur.com/5OmIR.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/5OmIR.jpg" alt="Shows image of the exported pdf file"></a></p>
  
  <p>So, how can I get two headers in pdf using data table?</p>
  
  <p>Thanks in advance.</p>