Hi! I have a cell background color issue with Aspose 8.0. In the attached PDF you can see that the bottom cell background color overlaps the cell above. It is not a lot (maybe 1 pixel) but it can still be seen in the viewer and on paper. Here is the code used to produce the attached PDF:
public static void CellBackgroundColorOverlapsOtherCell()
{
Pdf pdf = new Pdf();
Section section = new Section(pdf);
pdf.Sections.Add(section);
Table table = new Table() { ColumnWidths = “150 15” };
Row row = table.Rows.Add();
row.FixedRowHeight = 45.0f;
AddCellWithBackground(row, “LightGray”);
row.Cells.Add();
// Second row is green on all cells. It’s going to look like a separation line and in the output
// we can see the width. The gray from the bottom cell seems to overlap with the green.
// Even if we set the FixedRowHeight to a greater value (ex.: 4), we still see the glitch.
row = table.Rows.Add();
row.FixedRowHeight = 0.5f;
//row.BackgroundColor = new Color(“Green”); // We can still see the glitch with this line
AddCellWithBackground(row, “Green”);
AddCellWithBackground(row, “Green”);
row = table.Rows.Add();
row.FixedRowHeight = 45.0f;
AddCellWithBackground(row, “LightGray”);
row.Cells.Add();
section.Paragraphs.Add(table);
string filename = @“d:\CellBackgroundColorOverlapsOtherCell.pdf”;
pdf.Save(filename);
Process.Start(filename);
}
private static void AddCellWithBackground(Row row, string backgroundColor)
{
Cell c = row.Cells.Add();
c.BackgroundColor = new Color(backgroundColor);
}
Thanks,
Jean-François Rouleau