Rounded corners for row or table

Hi!

I tryed to have rounded corners around a row, with this code :

t = new Table();

t.ColumnWidths = "520";

r = new Row(t);

r.Cells.Add("Test");

r.FixedRowHeight=450;

BorderInfo bI = new BorderInfo((int)BorderSide.All,1F);

GraphInfo gI = new GraphInfo();

gI.CornerRadius = 0.1F;

bI.Round = gI;

r.Border = bI;

t.Rows.Add(r);

sec1.Paragraphs.Add(t);

But it does not work.

Any idea?

Regards,

I've seen in a july 2010 post that rounded cornes where not possible in july but that you would work on it... But I don't know if the work is done

Hello Jean-Christian,

Thanks for using our products.

I am afraid the feature is still not working. The problem is logged in our issue tracking system as PDFNET-24247. We are looking into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Hello Jean-Christian,

Thanks for your patience.

We have further analyzed this issue and have found that in order to create a round border for a table, you must set a BorderInfo for the table. not for the row, without any parameters. Please try using the following code snippet that I have used for testing with Aspose.Pdf for .NET 5.0.0 and as per my observations, the rounded border is properly being displayed. The resultant PDF is in attachment. Please take a look.

[C#]

Pdf pdf = new Pdf();
Aspose.Pdf.Section sec = pdf.Sections.Add();

Aspose.Pdf.Table table1 = new Aspose.Pdf.Table();
sec.Paragraphs.Add(table1);
table1.ColumnWidths = "200";

Row row1 = table1.Rows.Add();
row1.Cells.Add("Test");
row1.FixedRowHeight = 450;

BorderInfo bI = new BorderInfo();
GraphInfo gI = new GraphInfo();
gI.CornerRadius = 2F;
table1.CornerStyle = BorderCornerStyle.Round;
gI.Color = new Aspose.Pdf.Color("green");
bI.Round = gI;
table1.Border = bI;

pdf.Save(@"d:/pdftest/TableBorderIssue.pdf");

In case you still face any problem or you have any further query, please feel free to contact. We apologize for the delay and inconvenience.

Perfect!

Thank you very much.

Regards,

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


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