Unplanned
Last Updated: 06 Oct 2026 08:57 by Tomas
Tomas
Created on: 06 Oct 2026 08:57
Category: WordsProcessing
Type: Bug Report
0
WordsProcessing: PdfFormatProvider: Unexpected table content indentation during PDF export when cells lack explicit margins and do not inherit table-level margins

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;
                }
            }
        }
    }
}

0 comments