We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Loaded ConditionalTableStyle padding always at zero

Hi,

I’m loading a document template and I want to apply the TableStyle’s FirstRow padding manually to another row. The issue I have is that the ConditionalStyle.__Padding is always 0 instead of the value I set and saved in MS Word. image.png (104.4 KB)

See attached example: DotxTableStylePaddingAlwaysZero.zip (11.7 KB)

I have a template dotx with the “Table Grid” Table Style modified to have both a Default Cell Padding and a different First Row padding.

The loaded style is always 0…

var gridTableStyle = (TableStyle) doc.Styles.First(x => x.BuiltIn && x.Name == "Table Grid");
Console.WriteLine($"Table Default Top Padding: {gridTableStyle.TopPadding}");
Console.WriteLine($"Table Default Bottom Padding: {gridTableStyle.BottomPadding}");
Console.WriteLine($"Table Default Left Padding: {gridTableStyle.LeftPadding}");
Console.WriteLine($"Table Default Right Padding: {gridTableStyle.RightPadding}");

Console.WriteLine();

var firstRowStyle = gridTableStyle.ConditionalStyles.FirstRow;
Console.WriteLine($"First Row Top Padding: {firstRowStyle.TopPadding}");
Console.WriteLine($"First Row Bottom Padding: {firstRowStyle.BottomPadding}");
Console.WriteLine($"First Row Left Padding: {firstRowStyle.LeftPadding}");
Console.WriteLine($"First Row Right Padding: {firstRowStyle.RightPadding}");

Can you confirm the bug and provide a fix or workaround?

Thanks.

@dstj

We have logged this problem in our issue tracking system as WORDSNET-21166. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like