You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm using pdfmake 0.2 and I'm finding it impossible to set the padding/margins of a nested table (a parent table with a cell that has a table in it). No matter what layout/styling I use, the nested table has a 5 or so of white space around it.
That is unless I set a custom padding callback and just return 0. Then the nested table's padding is eliminated but all the other cells in the parent table lose their natural padding.
So I seeked to figure out how to detect which cell the callback is firing on. The index is the table row (I believe) and the node is the doc object the layout is calling from. BUT I don't know what to do about finding that 4th row, 3rd cell so I can return 0 or whatever the default style is:
It's frustrating because the documentation itself doesn't explain what (i, node) is supposed to be used for. The examples seem completely without context. They compare i against table row length and table widths length.
I would have assumed that the callback would include both the row and cell idx. How am I supposed to determine which call the callback is being used for?
The text was updated successfully, but these errors were encountered:
I'd say padding is just allowed at row level and it is not possible to define the padding of a single cell.
As an alternative, you could try to set negative margins on your nested table to undo the padding of the parent. Or you could set the padding of the row to 0 and play with positive margins in the cells that don't contain the nested table.
Hi. I'm using pdfmake 0.2 and I'm finding it impossible to set the padding/margins of a nested table (a parent table with a cell that has a table in it). No matter what layout/styling I use, the nested table has a 5 or so of white space around it.
That is unless I set a custom padding callback and just return 0. Then the nested table's padding is eliminated but all the other cells in the parent table lose their natural padding.
So I seeked to figure out how to detect which cell the callback is firing on. The index is the table row (I believe) and the node is the doc object the layout is calling from. BUT I don't know what to do about finding that 4th row, 3rd cell so I can return 0 or whatever the default style is:
It's frustrating because the documentation itself doesn't explain what
(i, node)
is supposed to be used for. The examples seem completely without context. They compare i against table row length and table widths length.I would have assumed that the callback would include both the row and cell idx. How am I supposed to determine which call the callback is being used for?
The text was updated successfully, but these errors were encountered: