title: How to format the data using jspdf, i want 1st column in bold?
body: <p>How to format the data using jspdf, i want  1st column in bold, and the second column in normal text, want to align it in the middle of the pdf output.
  Also i want a different colour for the first column in pdf and another color in 2nd column.</p>
  
  <p>This is my code now- </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;success&lt;/title&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  function tableToJson(table) {
      var data = [];
  
      // first row needs to be headers
      var headers = [];
      for (var i=0; i&lt;table.rows[0].cells.length; i++) {
          headers[i] = table.rows[0].cells[i].innerHTML.toLowerCase().replace(/ /gi,'');
      }
      data.push(headers);
      // go through cells
      for (var i=1; i&lt;table.rows.length; i++) {
  
          var tableRow = table.rows[i];
          var rowData = {};
  
          for (var j=0; j&lt;tableRow.cells.length; j++) {
  
              rowData[ headers[j] ] = tableRow.cells[j].innerHTML;
  
          }
  
          data.push(rowData);
      }       
  
      return data;
  }
  function callme(){
  var table = tableToJson($('#table-id').get(0));
  var doc = new jsPDF('l','pt','letter',true);
  
  doc.setFont("courier");
  doc.setFontType("italic");
   margins = {
              top: 80,
              bottom: 60,
              left: 40,
              width: 522
          };
  $.each(table, function(i, row){
    $.each(row, function(j,cell){
  
    if(j=="startdate" | j==2){
     doc.cell(5,20,290,20,cell,i);  
    }
    else{
      doc.cell(5,20,290,20,cell,i);
    }
  
    });
  });
  
  doc.save('Safaa.pdf');
  }
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;form value&lt;/p&gt;
  
  &lt;div class="container" id="pdf"&gt;  
  &lt;a href="javascript:genPDF()"&gt;Download PDF&lt;/a&gt;
       {{#each arrayofpromotion}}        
    &lt;table id="table-id" class="table table-bordered"&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;StartDate&lt;/th&gt;
          &lt;td&gt; {{StartDate}} &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;EndDate&lt;/th&gt;
          &lt;td&gt;{{EndDate}}&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;promotionId&lt;/th&gt;
          &lt;td&gt;{{PromotionId}}&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;ArticleNo&lt;/th&gt;
          &lt;td&gt;{{ArticleNo}}&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;PromotionsubsAdjID&lt;/th&gt;
          &lt;td&gt;{{PromotionsubsAdjID}}&lt;/td&gt;
        &lt;/tr &gt;
        &lt;tr&gt;
          &lt;th&gt;promotionNameEN&lt;/th&gt;
          &lt;td&gt;{{PromotionNameEN}}&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;promotionNameFR&lt;/th&gt;
          &lt;td&gt;{{PromotionNameFR}}&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;LedgerDesc&lt;/th&gt;
          &lt;td&gt;{{LedgerDesc}}&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;LedgerDescFR&lt;/th&gt;
          &lt;td&gt;{{LedgerDescFR}}&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
    &lt;/table&gt;
     {{/each}}
     &lt;a href="javascript:callme()"&gt;Call Me&lt;/a&gt;
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.4/jspdf.min.js"&gt;&lt;/script&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  
  [Right now i am getting this type of Output][1]
  </code></pre>