We are trying to add a revisions to list indicators/list items. Specifically for the bullet/non bullet types.
However during our analysis we find that revisions are not added for any list types(bullets or any other List Template). Revision is added for text node only. Is this a known issue or are we missing something?
Aspose Word Java version : 24.9
@mandeep.dfin
It appears that you are experiencing an issue with adding revisions to list indicators or list items in Aspose.Words for Java. Currently, revisions are primarily applied to text nodes, and it seems that revisions for list types, including bullet and non-bullet lists, are not being tracked as expected.
This behavior may not necessarily be a known issue, but it is important to note that the revision tracking feature in Aspose.Words is designed to highlight changes made to the content and formatting of the document. While you can track changes to text, the handling of revisions for list items may not be as straightforward.
To ensure that you are using the revision tracking feature correctly, you can follow these steps:
- Start Revision Tracking: Use the
StartTrackRevisions
method to begin tracking changes in your document.
- Make Changes: Add or modify your list items as needed.
- Stop Revision Tracking: Use the
StopTrackRevisions
method to end the tracking session.
- Review Revisions: After stopping the tracking, you can review the revisions made to the text nodes, but keep in mind that list indicators may not show revisions in the same way.
If you are looking for specific functionality regarding list item revisions, it may be beneficial to check the official documentation or forums for any updates or workarounds that other users may have discovered.
For further assistance, you might want to explore the following resources:
- Tutorials on managing revisions in Aspose.Words for Java, which provide insights into tracking changes and managing document history.
- Examples of how to automate revision tasks, which could help streamline your workflow.
If you continue to face challenges, consider reaching out to the Aspose support forum for more targeted help.
Sources:
[1]: Using Revisions in Aspose.Words for Java
[2]: Document Revision | Aspose.Words Java Document Processing API
@mandeep.dfin Could you please attach your input document and expected output? We will check the issue and provide you more information.
I am attaching the code sample we are using and output file for it.
Also attaching expected word file.
output 1.docx (7.9 KB)
package org.example;
import com.aspose.words.*;
public class Main {
public static void main(String[] args) throws Exception {
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
doc.startTrackRevisions("Author");
// Create a bulleted list
builder.getListFormat().applyBulletDefault();
doc.stopTrackRevisions();
doc.save("output.docx");
}
}
Expected.docx (14.9 KB)
@mandeep.dfin Thank you for additional information. Unfortunately, this is an expected behavior. Currently Aspose.Words supports tracking of node insertions and deletions only. Formatting changes are not recorded as revisions.