Rounded corner table with background color

Hi,
I am trying to create a table with rounded border with background color but the background color appears outside the table. Below is the code that i am using. Even applying background color to row or cell is not working.

Aspose.Pdf.Table tempTable = new Aspose.Pdf.Table();
tempTable.BackgroundColor = new Aspose.Pdf.Color(242, 242, 242);
tempTable.ColumnWidths = “95%”;
tempTable.Alignment = Aspose.Pdf.AlignmentType.Center;
tempTable.Margin.Top = 1;

tempTable.IsBroken = false;

//For rounded corner
Aspose.Pdf.BorderInfo binfo = new Aspose.Pdf.BorderInfo();
Aspose.Pdf.GraphInfo gI = new Aspose.Pdf.GraphInfo();
gI.CornerRadius = 8F;
gI.FillColor = new Aspose.Pdf.Color(242, 242, 242);
gI.Color = new Aspose.Pdf.Color(165, 165, 165);

binfo.Round = gI;
gI.IsFilled = true;
if (isWithBorder)
{
tempTable.Border = binfo;
}

Aspose.Pdf.Row headingRow = tempTable.Rows.Add();

headingRow.IsBroken = false;
Aspose.Pdf.Cell headingCell2 = headingRow.Cells.Add();
if (isAlignCenter)
headingCell2.Alignment = Aspose.Pdf.AlignmentType.Center;
else
headingCell2.Alignment = Aspose.Pdf.AlignmentType.Left;

Aspose.Pdf.Text heading = CreateText(strFontName, headerText, 11, true, new Aspose.Pdf.Color(0, 0, 0));
heading.Margin = GetTextMargin5();

headingCell2.Paragraphs.Add(heading);
Aspose.Pdf.Text desc = CreateText(strFontName, descText, 11, false, new Aspose.Pdf.Color(127, 127, 127));
desc.Margin = GetTextMargin5();
headingCell2.Paragraphs.Add(desc);
tempTable.BackgroundColor = new Aspose.Pdf.Color(242, 242, 242);
tempTable.PositioningType = Aspose.Pdf.PositioningType.Auto;

tempTable.CornerStyle = Aspose.Pdf.BorderCornerStyle.Round;
return tempTable;

Hello Tris,

Thanks for using our products.

I have tested the scenario and I am able to reproduce the same problem. For the sake of correction, I have logged it in our issue tracking system as PDFNET-27826. We will investigate this issue in details and will keep you updated on the status of a correction. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

We apologize for your inconvenience.

The issues you have found earlier (filed as 27826 ) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.