Hi!
First of all, awsome library, thx for the work so far!
I've stepped into an issue when trying to reuse a table in the document content. The first one shows ok, but the second one only renders the lines... no content at all.
I've reproduced it in the playground with:
var table = {
style: 'tableExample',
table: {
body: [
['Column 1', 'Column 2', 'Column 3'],
['One value goes here', 'Another one here', 'OK?']
]
}
}
var dd = {
content: [
table,
table
],
styles: {
tableExample: {
margin: [0, 5, 0, 15]
}
}
}
Any way around this? thanks in advance
duplicate: https://github.com/bpampuch/pdfmake/issues/465
For example, you can insert from function:
function getTable() {
return { style: 'tableExample', table: { body: [ ['Column 1', 'Column 2', 'Column 3'], ['One value goes here', 'Another one here', 'OK?'] ] } }
}
var dd = {
content: [ getTable(), getTable() ],
styles: { tableExample: { margin: [0, 5, 0, 15] } }
}
Thanks
Most helpful comment
duplicate: https://github.com/bpampuch/pdfmake/issues/465
For example, you can insert from function: