I want to generate a table from node.js to be printed in pdf format using html-pdf library but unfortunately my code won't work. The problem is because the html-pdf won't execute html tags. It execute the tags as string instead.
var tableBody = '';
for (i = 1; i < data.lenght; i++);
{
tableBody = tableBody + '<tr>' +
'<td>' + data[i].full_name + '</td>' +
'<td>' + data[i].age + '</td>' +
'<td>' + data[i].address + '</td>' +
'</tr>';
}
pdfParam.tableBody = tableBody;
then in html file, my code just like this.
<table>
<tbody>
{{tableBody}}
</tbody>
</table>
Is there a way to solve this? Any answers and comments are really appreciated.