Hi
I have posted the Right border issue for table report already. But
When I add the following code, the right border problem is solved.
Document mainDoc = new Document("C:\\ReportRepository\\ReportTemplate.docx");
DocumentBuilder builder = new DocumentBuilder(mainDoc);
builder.MoveToBookmark("SummaryOfIncidentsClosed");
int index = 0;
index = mainDoc.Sections.IndexOf(builder.CurrentSection);
Aspose.Words.Tables.Table tab;
tab = mainDoc.Sections[index].Body.Tables[0];
tab.Rows[1].RowFormat.Bidi = true;//After this setting the borders are coming fine.
But,
builder.RowFormat.AllowAutoFit = false; // this setting I am doing to ensure that the table looks exactly like reports
tab.Rows[1].RowFormat.ClearCellPadding(); // this setting makes the borders visible in PDF
tab.Rows[1].RowFormat.Bidi = true;// this setting makes borders visible in word document but causing some cells to wrap content
I want to keep the table cells exatcly looks like in report as well as borders should be visble both in word document.
But is is causing some of the cells to wrap their content. For example some cells which contain date and time wrapped to 3 lines, which makes the report looks bad. Can anyone help me get sort of this to make all the cells fit to their preferred widths as well as the borders should be visible.
P.S. When I have done the steps 1 and 2 as mentioned above, the borders are coming fine as well as the cells are not wrapped in PDF, but in word the cells are wrapped and borders are coming fine. I am using latest vesrion of updated DLL(Aspose.word 9.1.0.0)