Am trying to convert my html table to pdf using pdfmake http://pdfmake.org/ but i cant make it to how to use
Below is the correct syntax to pass the table data :-
var docDefinition = {
content: [
{
table: {
body: [
[ 'First', 'Second', 'Third', 'The last one' ],
[ 'Value 1', 'Value 2', 'Value 3', 'Value 4' ],
[ { text: 'Bold value', bold: true }, 'Val 2', 'Val 3', 'Val 4' ]
]
}
}
] };
This will print the HTML table and not the html code on the pdf file.You need to pass the table data in this format.