I have a paragraph (table heading) which gets numbered by field codes, with change tracking active.
When I accept the changes with aspose, the field code ending is moved and the actual title won’t be rendered anymore.
Can this be fixed?
Aspose Version is 17.6
Attached word files:
10219-2.docx - input file with change tracking enabled
10219-2.aspose.docx - changes accepted and change tracking disabled by aspose
10219-2.word.docx - changes accepted and change tracking disabled by word
10219-2.zip (26.6 KB)
My java code:
import java.io.FileInputStream;
import com.aspose.words.Document;
import com.aspose.words.License;
public class AsposeTester2 {
public static void main(String[] args) throws Exception {
License lic = new License();
lic.setLicense(new FileInputStream("/home/sbulka/dev/aspose/license/Aspose.Words.lic"));
System.out.println("licensed:" + lic.isLicensed());
// The path to the documents directory.
for(String fileIn : args) {
String fileOut = fileIn.replaceAll("\\.docx$", ".aspose.docx");
// Load the document from disk.
System.out.println("loading Document:" + fileIn);
Document doc = new Document(fileIn);
doc.acceptAllRevisions();
doc.setTrackRevisions(false);
System.out.println("Saving Document:" + fileOut);
doc.save(fileOut);
}
}
}