Free Support Forum - aspose.com

Table Cell Border and Background Gap

Hello

I have a table with a background color and a border. There is a gap between the inside of the border and the background color. The gap appears to be almost half the width of the border. It would be really great for that gap not to be present. I think what is happening is the background is being pushed to compensate for the border width (as the border sits half inside the cell and half outside).

I am using the latest version (v 4.1.0.0).

I have tried setting padding to 0 and that has not worked either.

Any ideas into the matter will be greatly appreciated.

Here is a heavily simplified test case I set up…

private void BuildTablesTest(Section s) {
Cell testCell;
Table testTable;
Row testRow;

testTable = new Table();
s.Paragraphs.Add(testTable);
testRow = testTable.Rows.Add();
testCell = testRow.Cells.Add();
testCell.Border = new BorderInfo((int)BorderSide.All, 5, new Color(System.Drawing.Color.Pink.Name));
testCell.BackgroundColor = new Color(“Blue”);

Text t = new Text();
Segment seg = t.Segments.Add();
seg.Content = “A B C”;
testCell.Paragraphs.Add(t);
}


Thanks,

Hello David,

I have tested the issue and I’m able to reproduce the same problem. We will investigate this issue in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.