Hello Aspose team,
I have identified a regression in the latest version of Aspose.Words for .NET related to table layout during DOCX → PDF conversion.
Problem description
When a table contains one or more rows whose cell margins (padding) differ from the previous rows, the rows that follow them incorrectly inherit these margins in the generated PDF.
More precisely:
- Rows above the row with different margins keep their correct dimensions.
- Rows below that row incorrectly adopt its margins/padding.
- This results in a broken table layout, as the width of the cells in the lower part of the table no longer matches the DOCX.
This occurs whether the “special” row contains text or is empty.
This issue did not exist in Aspose.Words 25.4.0 and seems to be a regression introduced in newer versions.
Minimal example
I reproduced the issue with a simple table of 6 rows and 2 columns:
- Rows 1, 2, 5, and 6 have identical left/right cell margins.
- Rows 3 and 4 have smaller cell margins (thus wider cells).
Expected:
All six rows retain their individual margins exactly as defined in the DOCX.
Actual result after PDF conversion:
- Rows 1 to 4 are correct.
- Rows 5 and 6 incorrectly inherit the smaller margins from rows 3 and 4.
This clearly indicates that the different margins of rows 3–4 affect only the following rows, not the entire table.
Code to reproduce
Aspose.Words.Document document = new Aspose.Words.Document(fileStream);
document.Save(outputStream, Aspose.Words.SaveFormat.Pdf);
No special options or settings are needed.
Attachments
I will attach:
- table_margin_bug.zip (18,7 Ko) — minimal reproduction document with 6-row table
- output.pdf (11,6 Ko) — converted result showing the issue
- screenshot (61,9 Ko)
Regression details
- Correct behavior in: Aspose.Words 25.4.0
- Incorrect behavior in: latest version (tested on 25.11.0)
- Framework: .NET (version 8.0)
Request
Could you please:
- Confirm the issue.
- Create a tracking ticket (e.g.,
WORDSNET-xxxxx) if not already logged. - Advise if a fix or workaround is possible.
Thank you very much for your help.
Let me know if you need additional files or information.