Hi,
I don't know if I've found a bug or if I am doing something wrong...
I am working with Migradoc library (C# Nuget 1.50.5147).
As an example let's take a table with four columns, where we merge the third and fourth (last) one and add borders to them:
Code:
private static Table BuildTable()
{
Table table = new Table();
table.AddColumn(100);
table.AddColumn(60);
table.AddColumn(280);
table.AddColumn(60);
Row row = table.AddRow();
Cell cell = row.Cells[0];
cell.AddParagraph("A");
SetBorder(cell);
cell = row.Cells[1];
cell.AddParagraph("B");
SetBorder(cell);
cell = row.Cells[2];
cell.MergeRight = 1;
cell.AddParagraph("C");
SetBorder(cell);
return table;
}
private static void SetBorder(Cell cell)
{
cell.Borders.Top.Width = 1;
cell.Borders.Left.Width = 1;
cell.Borders.Right.Width = 1;
cell.Borders.Bottom.Width = 1;
}
The result is that the merged cell does not have the right border:
Attachment:
migra1.png [ 1.43 KiB | Viewed 19693 times ]
If I add another column, in order that the merge one is not the last one like followings, it works:
Code:
// rest of code
table.AddColumn(60);
table.AddColumn(60); <-- Added fifth column
Row row = table.AddRow();
// rest of code
Is it a bug?