Hello,
I’m using Aspose 10.3.0 to generate Word-docs.
Whenever I’m creating a table, the borders aren’t generated correctly.The bottom and right table border aren’t filled at all, while they should be.
Code I use to do so:
Aspose.Pdf.Table tableTotalHours = new Aspose.Pdf.Table();
tableTotalHours.DefaultCellPadding = new Aspose.Pdf.MarginInfo(2, 2, 2, 2);
tableTotalHours.ColumnWidths = “40”;
tableTotalHours.DefaultCellBorder = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.1F, Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black));
tableTotalHours.Margin.Left = 200d;
tableTotalHours.Margin.Top = 20d;
Aspose.Pdf.Row totalHourRow = tableTotalHours.Rows.Add();
totalHourRow.DefaultCellBorder = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.1F, Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black));
Aspose.Pdf.Cell totalHourIndexCell = totalHourRow.Cells.Add(language[languageValue][“Hours”]);
Aspose.Pdf.Cell totalHourCell = totalHourRow.Cells.Add(hourSum.ToString());
Aspose.Pdf.Row totalDaysRow = tableTotalHours.Rows.Add();
totalDaysRow.DefaultCellBorder = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.1F, Aspose.Pdf.Color.FromRgb(System.Drawing.Color.Black));
Aspose.Pdf.Cell totalDaysIndexCell = totalDaysRow.Cells.Add(language[languageValue][“Days”]);
Double totalDays = 0.0;
totalDays = Math.Round(hourSum / 8, 1);
Aspose.Pdf.Cell totalDaysCell = totalDaysRow.Cells.Add(totalDays.ToString());
hfHeaderUren.Paragraphs.Add(tableTotalHours);
As you can see, I’m using the table-defaultCellBorder to generate all borders, and after that, also have all row borders generated.
When using either of the two ‘border generators’, I’m getting thesame result.
Thanks in advance,
Peter