-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
When I create tables and nested tables, the borders of adjacent cells do not overlap. Instead, the borders become thicker, as if adding up.
The UseVariableBorders property doesn't help, so I decided to individually set the border thickness of each side of the cell.
Code looks like this:
for (int i = 0; i < 5; i++)
{
PdfPCell currentCell = new PdfPCell(new Phrase(i.ToString(), normal));
currentCell.BorderWidthBottom = thinLineWidth;
currentCell.BorderWidthLeft = thinLineWidth;
currentCell.BorderWidthRight = thinLineWidth;
currentCell.BorderWidthTop = boldLineWidth;
currentCell.Padding = 0;
currentCell.FixedHeight = mmtop(height);
table.AddCell(currentCell);
table.WriteSelectedRows(0, -1, mmtop(x), mmtop(y), canvas);
}
But result looks bad. Also you can see summing of border width between cells 3 and 4 here
I've noticed that if I set BorderWidth (not Top/Right etc) missalignmentt dissapears
for (int i = 0; i < 5; i++)
{
PdfPCell currentCell = new PdfPCell(new Phrase(i.ToString(), normal));
currentCell.BorderWidth = boldLineWidth;
currentCell.Padding = 0;
currentCell.FixedHeight = mmtop(height);
table.AddCell(currentCell);
table.WriteSelectedRows(0, -1, mmtop(x), mmtop(y), canvas);
}

Metadata
Metadata
Assignees
Labels
No labels