Is there any solution available to change table cell border color ?
Example from http://pdfmake.org/playground.html
layout: {
hLineWidth: function(i, node) {
return (i === 0 || i === node.table.body.length) ? 2 : 1;
},
vLineWidth: function(i, node) {
return (i === 0 || i === node.table.widths.length) ? 2 : 1;
},
hLineColor: function(i, node) {
return (i === 0 || i === node.table.body.length) ? 'black' : 'gray';
},
vLineColor: function(i, node) {
return (i === 0 || i === node.table.widths.length) ? 'black' : 'gray';
},
// paddingLeft: function(i, node) { return 4; },
// paddingRight: function(i, node) { return 4; },
// paddingTop: function(i, node) { return 2; },
// paddingBottom: function(i, node) { return 2; }
}
@jthoenes can this not be controlled on a cell by cell basis?
exactly like in the code above. Make your function react on the i param and you're there.
@jthoenes That's for the table as a whole, not controllable for each individual cell is it? Like how you can control what borders are visible or hidden per item?
Say I have a single cell somewhere in the table and I need the right vertical border to be 2 pixels. How can I achieve that with the above example.
@jthoenes @douglasg14b: I'm also interested how this can be done? I tried to loop through the nodes, rows and cells but this doesn't make sense or?
Hi, Did anyone face the same problem?
Most helpful comment
Example from http://pdfmake.org/playground.html