Summary
Calling doc.getRevisions().acceptAll() can cause table borders to disappear or change in the saved document, as observed in similar cases where accepting tracked changes removed border formatting.
Why it happens
When a table’s borders are defined by a style or are part of tracked‑change markup, the accept‑all operation may clear that formatting. The revision‑accept process removes the style‑based border information, leaving the table without the expected border attributes.
What to do next
Inspect border settings before and after accepting revisions
Document doc = new Document("temp.docx");
// Before accepting revisions
for (Table tbl : (Iterable<Table>) doc.getFirstSection().getBody().getTables()) {
System.out.println("Before accept – InsideH: " + tbl.getBorderInsideH().getLineStyle());
}
// Accept all revisions
doc.getRevisions().acceptAll();
// After accepting revisions
for (Table tbl : (Iterable<Table>) doc.getFirstSection().getBody().getTables()) {
System.out.println("After accept – InsideH: " + tbl.getBorderInsideH().getLineStyle());
}
This will show whether the border objects are being reset.
Adjust the style, color, and width to match the original appearance.
Create a minimal reproducible sample
Build a small document containing a single table with a tracked change that modifies the border. Run the code above to verify whether the border loss still occurs. This sample can be used for further investigation or when reporting a bug.
If the problem persists
Gather the following information for a bug report:
The exact Aspose.Words for Java version you are using.
The minimal sample document that reproduces the issue.
The code snippet that triggers the border loss.
Providing these details will help the support or development team diagnose the problem.
Note: The behavior described aligns with known cases where accepting all revisions removed table border styling. If you observe different results, please verify the document’s border definitions (direct formatting vs. style‑based) and consider sharing the sample for deeper analysis.
I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.
@GusGus
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-28872
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.