Importing HTML tables with mixed inline width styles and auto-width cells, then exporting to PDF, can produce missing/narrow columns or wrapped labels.
For example, a 4-cell row with td style="width: 60%" and td style="width: 40%" causes the unlabeled cells to collapse in PDF output, even though the HTML renders correctly in browser.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<table>
<tr>
<td align="right">Customer:</td>
<td style="width: 60%;">Angel Popov</td>
<td align="right">Date:</td>
<td style="width: 40%;">4/4/2004</td>
</tr>
</table>
</body>
</html>Expected: all cells keep visible widths and text stays on one line.
Actual: auto columns shrink too much or disappear during PDF export after HTML import.
Hello
Calling MailMerge on a document with a nested repeating group throws NullReferenceException when a merged value contains a line terminator.
All of the following are required to reproduce the crash:
I have attached a minimal repro demonstrating the bug.
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;
}
}
}
}
}