title: jsPDF auto-table header text not working and how to render html to header
body: <p>Header example 
  <a href="https://i.stack.imgur.com/kUGQD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kUGQD.jpg" alt="enter image description here"></a></p>
  
  <p>using many examples online i was trying to print a header text to the top of the table. One thing i cant do is update the jsPDF and auto-table versions.This is due to some internal conflict where the code eventually goes. Question 1 is why is the the header not rendering to the top. Second question is how can i render  html to the top of the header instead of just text. Currently the doc.text only takes string as a parameter. </p>
  
  <p>i want to render something like : "<strong>Main Title</strong> small title " to the head
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
      &lt;title&gt;Document&lt;/title&gt;
  
      &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.2.60/jspdf.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/2.0.15/jspdf.plugin.autotable.js"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/2.0.15/jspdf.plugin.autotable.src.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
  
  &lt;body&gt;
      &lt;button onclick="generatePdf()"&gt;Generate pdf&lt;/button&gt;
  
  
      &lt;script&gt;
          function generatePdf(){
  
          var columns = [{
                  title: "ID",
                  dataKey: "id"
              },
              {
                  title: "Name",
                  dataKey: "name"
              },
              {
                  title: "Country",
                  dataKey: "country"
              },
          ];
          var rows = [{
                  "id": 1,
                  "name": "Shaw",
                  "country": "Tanzania"
              },
              {
                  "id": 2,
                  "name": "Nelson",
                  "country": "Kazakhstan"
              },
              {
                  "id": 3,
                  "name": "Garcia",
                  "country": "Madagascar"
              },
          ];
  
          var doc = new jsPDF('p', 'pt');
          var headerTxt ="This is test header"
          var header = function (data) {
              doc.setFontSize(18);
              doc.setTextColor(40);
              doc.setFontStyle('normal');
              //doc.addImage(headerImgData, 'JPEG', data.settings.margin.left, 20, 50, 50);
              doc.text(headerTxt, data.settings.margin.left, 50);
          };
          var options = {
              beforePageContent: header,
              margin: {
                  top: 80
              },
              startY: doc.autoTableEndPosY() + 20
          };
          doc.autoTable(columns, rows, options)
  
          doc.save('table.pdf'); 
      }
          &lt;/script&gt;
          &lt;/body&gt; 
          &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>