Unexpected table content indentation during PDF export when cells lack explicit margins and do not inherit table-level margins.
Manual Workaround Before PDF Export:
Preserve direct cell overrides; materialize table-default padding only for cells with no local padding:
foreach (var section in document.Sections)
{
foreach (var block in section.Blocks)
{
if (!(block is Table table))
{
continue;
}
foreach (var row in table.Rows)
{
foreach (var cell in row.Cells)
{
if (!cell.Properties.Padding.HasLocalValue)
{
cell.Padding = table.TableCellPadding;
}
}
}
}
}