Render Cell content as HTML in jsPDF-AutoTable

Viewed 379

The text of a column in my table is required to render as HTML but the table can't render it, the following code is the way I'm generating the PDF:

var doc = new jsPDF({ format: 'a4', unit: 'px' });
  doc.setFontSize(10);
  var alignOption: any = { align: 'left' };
  if (company) doc.text(`Company: ${company}`, 10, 15, alignOption);
  if (division) doc.text(`Division: ${division}`, 10, 30, alignOption);
  autoTable(doc, {
    styles: { fontSize: 5 },
    columnStyles: { 5: { cellWidth: 200 } },
    margin: { top: 40, bottom: 40 },
    head: [Object.keys(data[0])],
    body: formatedData,
    foot: [['total', '500']],
  });
  doc.save('hourlyReport.pdf');

The following image is the result I get: enter image description here

Is there a way I can render the marked information as HTML?

0 Answers
Related