Wrong row height for table cell is returned (C# .NET)

I want to get the height of the table and dynamically place the AutoShape under the table.

However, the height of the table is different from what I think.
Apparently, at the height of the line, depending on how the characters in the cell are folded,
It looks like the height is not the correct value.

Is there a way to get the correct height?

Please refer to the following sources.

test.zip (34.7 KB)

var presentation = new Presentation("pptxPath");
var slide = presentation.Slides[0];

Console.WriteLine(((ITable)slide.Shapes[0]).Rows[0].Height);  // 55.2  **Problem cell**
Console.WriteLine(((ITable)slide.Shapes[0]).Rows[1].Height);  // 45.600000000000009
Console.WriteLine(((ITable)slide.Shapes[0]).Rows[2].Height);  // 45.599999999999994
Console.WriteLine(((ITable)slide.Shapes[0]).Rows[3].Height);  // 45.599999999999994
Console.WriteLine(((ITable)slide.Shapes[0]).Rows[4].Height);  // 45.599999999999994  **Problem cell**
Console.WriteLine(((ITable)slide.Shapes[0]).Rows[5].Height);  // 45.600000000000023  **Problem cell**

The height of Rows [0] looks like only 2 rows.
The height of Rows [5] and Rows [6] seems to be only one row.

Best Regard.

@yuya,

I have worked with sample code and presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-41151 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

1 Like

The issues you have found earlier (filed as SLIDESNET-41151) have been fixed in this update.

1 Like