Hi all,
i put a border to my table and set CornerRadius to 15. After this i added 2 rows with 1 cell per row.
private static void CreatePdf() { // Instantiate Pdf object Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf(); //Create the section in the Pdf object Aspose.Pdf.Generator.Section sec1 = pdf1.Sections.Add(); //Instantiate a table object Aspose.Pdf.Generator.Table tab1 = new Aspose.Pdf.Generator.Table();tab1.FixedHeight = 200; <span style="color: green;">//Add the table in paragraphs collection of the desired section</span> sec1.Paragraphs.Add(tab1); <span style="color: green;">//Set with column widths of the table</span> tab1.ColumnWidths = <span style="color: rgb(163, 21, 21);">"200"</span>; <span style="color: green;">//create a blank BorderInfo object</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderInfo</span> bInfo = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderInfo</span>(); <span style="color: green;">// create a GraphInfo object without any argument to its constructor</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">GraphInfo</span> gInfo = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">GraphInfo</span>(); <span style="color: green;">// set the corner radius for GraphInfo</span> gInfo.CornerRadius = 15F; <span style="color: green;">// specify the line color information </span> gInfo.Color = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Red"</span>); <span style="color: green;">// set the rounded corner table border</span> bInfo.Round = gInfo; <span style="color: green;">// specify the Corner style for table border as Round</span> tab1.CornerStyle = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderCornerStyle</span>.Round; <span style="color: green;">// set the table border information</span> tab1.Border = bInfo; <span style="color: green;">//Create rows in the table and then cells in the rows</span> <span style="color: green;">// Set Default border To Cells</span> <span style="color: blue;">var</span> row1 = tab1.Rows.Add(); <span style="color: blue;">var</span> row2 = tab1.Rows.Add(); row2.Cells.Add(<span style="color: rgb(163, 21, 21);">"Hello World..."</span>); row2.Cells[0].BackgroundColor = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Green"</span>); <span style="color: green;">// add sample string to paragraphs collection of table cell</span> row1.Cells.Add(<span style="color: rgb(163, 21, 21);">"Hello World..."</span>); <span style="color: green;">// set the vertical alignment of text as center aligned</span> row1.Cells[0].DefaultCellTextInfo.Alignment = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">AlignmentType</span>.Center; row1.Cells[0].BackgroundColor = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Blue"</span>); <span style="color: green;">// set the horizontal alignment of text as center aligned </span> row1.Cells[0].VerticalAlignment = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">VerticalAlignmentType</span>.Center; <span style="color: green;">//Save the Pdf</span> <span style="color: green;">//Dokument ausgeben</span> pdf1.Save(<span style="color: rgb(163, 21, 21);">@"C:\temp\test.pdf"</span>); }</pre><pre style="background: white; color: black; font-family: Consolas;"> </pre><p>The result is that i get a Table with rounded Corners. But alle Cells have the same Border. Now i tried to put a other Border without CornerRadius to my Cells. </p><pre style="background: white; color: black; font-family: Consolas;"><pre style="background: white; color: black; font-family: Consolas;"> <span style="color: blue;">private</span> <span style="color: blue;">static</span> <span style="color: blue;">void</span> CreatePdf() { <span style="color: green;">// Instantiate Pdf object</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Pdf</span> pdf1 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Pdf</span>(); <span style="color: green;">//Create the section in the Pdf object</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Section</span> sec1 = pdf1.Sections.Add(); <span style="color: green;">//Instantiate a table object</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Table</span> tab1 = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Table</span>(); tab1.FixedHeight = 200; <span style="color: green;">//Add the table in paragraphs collection of the desired section</span> sec1.Paragraphs.Add(tab1); <span style="color: green;">//Set with column widths of the table</span> tab1.ColumnWidths = <span style="color: rgb(163, 21, 21);">"200"</span>; <span style="color: green;">//create a blank BorderInfo object</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderInfo</span> bInfo = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderInfo</span>(); <span style="color: green;">// create a GraphInfo object without any argument to its constructor</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">GraphInfo</span> gInfo = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">GraphInfo</span>(); <span style="color: green;">// set the corner radius for GraphInfo</span> gInfo.CornerRadius = 15F; <span style="color: green;">// specify the line color information </span> gInfo.Color = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Red"</span>); <span style="color: green;">// set the rounded corner table border</span> bInfo.Round = gInfo; <span style="color: green;">// specify the Corner style for table border as Round</span> tab1.CornerStyle = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderCornerStyle</span>.Round; <span style="color: green;">// set the table border information</span> tab1.Border = bInfo; <span style="color: green;">//Create rows in the table and then cells in the rows</span> <span style="color: green;">// Set Default border To Cells</span> <font style="background-color: rgb(255, 0, 0);" color="#000000">SetCellBorderInfo(tab1);</font> <span style="color: blue;">var</span> row1 = tab1.Rows.Add(); <span style="color: blue;">var</span> row2 = tab1.Rows.Add(); row2.Cells.Add(<span style="color: rgb(163, 21, 21);">"Hello World..."</span>); row2.Cells[0].BackgroundColor = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Green"</span>); <span style="color: green;">// add sample string to paragraphs collection of table cell</span> row1.Cells.Add(<span style="color: rgb(163, 21, 21);">"Hello World..."</span>); <span style="color: green;">// set the vertical alignment of text as center aligned</span> row1.Cells[0].DefaultCellTextInfo.Alignment = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">AlignmentType</span>.Center; row1.Cells[0].BackgroundColor = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Blue"</span>); <span style="color: green;">// set the horizontal alignment of text as center aligned </span> row1.Cells[0].VerticalAlignment = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">VerticalAlignmentType</span>.Center; <span style="color: green;">//Save the Pdf</span> <span style="color: green;">//Dokument ausgeben</span> pdf1.Save(<span style="color: rgb(163, 21, 21);">@"C:\temp\test.pdf"</span>); } <span style="color: blue;">private</span> <span style="color: blue;">static</span> <span style="color: blue;">void</span> SetCellBorderInfo(Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Table</span> table) { <span style="color: green;">//create a blank BorderInfo object</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderInfo</span> bInfo = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderInfo</span>(); <span style="color: green;">// create a GraphInfo object without any argument to its constructor</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">GraphInfo</span> gInfo = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">GraphInfo</span>(); <span style="color: green;">// set the corner radius for GraphInfo</span> gInfo.CornerRadius = 0; <span style="color: green;">// specify the line color information </span> gInfo.Color = <span style="color: blue;">new</span> Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">Color</span>(<span style="color: rgb(163, 21, 21);">"Red"</span>); <span style="color: green;">// set the rounded corner table border</span> bInfo.Round = gInfo; <span style="color: green;">// specify the Corner style for table border as Round</span> table.CornerStyle = Aspose.Pdf.Generator.<span style="color: rgb(43, 145, 175);">BorderCornerStyle</span>.None; <span style="color: green;">// set the table border information</span> table.DefaultCellBorder = bInfo; }</pre><pre style="background: white; color: black; font-family: Consolas;">Now is the result that the cells have no corner Radius. But they are overlaying </pre><pre style="background: white; color: black; font-family: Consolas;">the rounded Corners of the Table. Is there any way to clip the cells to the table?</pre><pre style="background: white; color: black; font-family: Consolas;"> </pre><pre style="background: white; color: black; font-family: Consolas;">Thank you in advance!</pre></pre>