Under the premise that the table width category is Points, when I used “Table.PreferredWidth.Value" to get the table width, I found that the obtained width was not correct. As you can see in the document, the table obviously exceeded the bodyWidth to reach the edge of the page, while the obtained width was actually smaller than the bodyWidth (bodyWidth = pagewidth-left margin-right margin). When the table width is a percentage, I use the cell width of the table to sum the table width, but the cell width also has this problem. Please check if your bug caused this problem. Is there any way to circumvent the problem? And I feel this problem may be related to a bug I mentioned earlier (https://forum.aspose.com/t/table-layout-is-incorrect-when-compatibility-mode-is-set-to-2010-using-net/211124)!
Note: I used 2010 compatibility mode when I initialized the document object：
string file = “c:\3256.docx”;
Document doc = new Document(file);
Error source:this is the err document
ERROR.zip (751.1 KB)