Cell formatting does not appear correctly if rowspan too large

Hi,


If I have a table cell, which has a rowspan longer than the rows underneath, the background color and borders do not span the entire cell. I have recently upgraded from a much older version of Aspose and this use to work.

I understand the workaround is to fix the tables I have, I am working on this.

Table table = new Table(section);
section.Paragraphs.Add(table);

table.DefaultCellBorder = new BorderInfo((int)BorderSide.All, new Color(“black”));

Row row1 = table.Rows.Add();

Cell cellRow1Col1 = row1.Cells.Add();
cellRow1Col1.BackgroundColor = new Color(“lightSteelBlue”);
cellRow1Col1.RowSpan = 2; // toggle this from 2 (correct) to 3 or more (too many)
cellRow1Col1.Paragraphs.Add(new Text(“x”));

Cell cellRow1Col2 = row1.Cells.Add();
cellRow1Col2.BackgroundColor = new Color(“lightSteelBlue”);
cellRow1Col2.Paragraphs.Add(new Text(“x”));

Row row2 = table.Rows.Add();

Cell row2Col2 = row2.Cells.Add();
row2Col2.BackgroundColor = new Color(“lightSteelBlue”);
row2Col2.Paragraphs.Add(new Text(“x”));

Hi David,


Thanks for your inquiry. We will appreciate it if you please confirm the version in which the scenario was working and sample output as well. So we will look into it and provide you more information accordingly. I have tested it in some old versions but did not notice any change in behavior, same as in table+rowspan+too+many.pdf.

We are sorry for the inconvenience caused.

Best Regards,

Hi Tilal,


I have fixed my tables to correctly rowspan so this issue isn’t bothering me anymore. I can still replicate it if I increase my rowspans.

I am using 10.3.0.0

Hi David,


We are glad to hear that your problem is resolved.

However we will try replicating the issue using latest release and the code snippet which you have shared earlier and will keep you posted with our findings.

Should you have any further query, please feel free to contact.