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);
int index = 0;
index = mainDoc.Sections.IndexOf(builder.CurrentSection);
tab = mainDoc.Sections[index].Body.Tables;
tab.Rows.RowFormat.Bidi = true;//After this setting the borders are coming fine.
builder.RowFormat.AllowAutoFit = false;// this setting I am doing to ensure that the table looks exactly like reports
1. tab.Rows.RowFormat.ClearCellPadding();// this setting makes the borders visible in PDF
2. tab.Rows.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 184.108.40.206)