After the update of an Aspose.words version of 2010 our report module shows borders, where they weren’t before…
private void CreateFooter()
{
//Footer
if (_Doc.FirstSection.HeadersFooters[HeaderFooterType.FooterPrimary] == null)
{
_Doc.FirstSection.AppendChild(new HeaderFooter(_Doc, HeaderFooterType.FooterPrimary));
}
HeaderFooter Footer = _Doc.FirstSection.HeadersFooters[HeaderFooterType.FooterPrimary];
if (Footer.FirstParagraph == null)
{
Footer.AppendChild(new Paragraph(_Doc));
}
Paragraph parafooter = Footer.FirstParagraph;
DocumentBuilder builder = new DocumentBuilder(_Doc);
builder.MoveTo(parafooter);
builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;
builder.ParagraphFormat.Style.Font.Size = ExporterStyle.ExportFontSize;
builder.ParagraphFormat.Style.Font.Name = ExporterStyle.ExportFontName;
builder.Writeln("");
builder.StartTable();
double tableWidth = PageWidth;
builder.InsertCell();
builder.CellFormat.Width = tableWidth / 2;
builder.InsertField(@“DATE @ ““dd/MM/yyyy”””, “”);
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Left;
builder.InsertCell();
builder.CellFormat.Width = tableWidth / 2;
builder.Write("Pagina “);
builder.InsertField(“PAGE”, “”);
builder.Write(” van ");
builder.InsertField(“NUMPAGES”, “”);
builder.CurrentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Right;
builder.EndRow();
builder.EndTable();
}
As you can see in the footer code, we don’t define any borders, but still they are present in the end report