prawnpdf/prawn-table

Inner tables don't respect cell padding

rhysb27 opened this issue · 1 comments

Inner tables appear to work fine when the inner table is only acting as a mechanism for splitting cells. However in my case, I want to give the actual appearance of a table within a table cell, using the cell's padding to achieve this. For example:

references = [
  ["Regulation", "(5.4.2)", "Example link"],
  ["Regulation", "(5.4.2)", "Example link"],
  ["Standard", "(5.4.2)", "Example link"],
  ["Best Practice", "(5.4.2)", "Example link"],
]

references_table = make_table(references, cell_style: { borders: [], size: 10 })

table_data = [
  ["Action will go here"],
  [{ content: references_table, padding: 15 }],
]

make_table(table_data, width: 452, cell_style: { size: 10, background_color: "FFFFFF" })

... results in:
table-not-respecting-padding

Whereas merely replacing references_table with text results in:
text-respecting-padding

How come text respects the cell's padding while the inner table doesn't?

👍
Same here but instead I would like no padding at all on the outside of the nested table