I have an RTF document that has a table with hidden/non-visible table borders, but when I open and save the document with Aspose to an PDF or DOC, the document has the table borders rendered. My initial solution was to programatically hide the table borders by doing the following
private void HideTableBorders(Aspose.Words.Tables.Table table) {
var updatedBorders = table.GetChildren<Aspose.Words.Tables.Cell>().Select(c => c.CellFormat.Borders);
foreach (var border in updatedBorders)
border.LineStyle = LineStyle.None;
}
The above does work, but it has negative effects tables for a similar scenario that do have their borders shown in our application.
Border-Visibility.zip (64.6 KB)
Aspose.Words for .NET v16.12.0.0
@elliot.justice,
Thanks for your inquiry. We have tested the scenario and have noticed that hidden border of table is visible after saving RTF to DOC and PDF. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-15763. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.
Regarding the workaround of this issue, please upgrade to the latest version of Aspose.Words for .NET 17.8. The shared code example works with Aspose.Words for .NET 17.8.
@tahir.manzoor Thanks for the quick reply. I just wanted to clarify that the code snipped i posted does in fact work in our version of aspose, but causes other issues in the application we need to support so we had to remove it.
-Elliot
@elliot.justice,
Thanks for sharing the detail. We will inform you via this forum thread once WORDSNET-15763 is resolved. Please let us know if you have any more queries.