the Aspose.Words for .net functionality does not highlight the change of page numbers in the TOC. We would expect Aspose.Words for .net to capture and highlight TOC page number changes.
Strangely enough, the TOC changes are recognized and highlighted when there are other changes in the TOC than only page numbers.
static void Main(string[] args)
{
string document1 = "TOC Compare 1.docx";
string document2 = "TOC Compare 2.docx";
// Load both documents in Aspose.Words
Console.WriteLine("Load original document: " + document1);
Aspose.Words.Document docOriginal = new Aspose.Words.Document(document1);
Console.WriteLine("Load modified document: " + document2);
Aspose.Words.Document docModified = new Aspose.Words.Document(document2);
docOriginal.Compare(docModified, "Compare Service", DateTime.Now);
string comparisonDocument = "TOC Compare output.docx";
Console.WriteLine("Save DOCX compare document: " + comparisonDocument);
docOriginal.Save(comparisonDocument);
string comparisonDocumentPDF = "TOC Compare output.pdf";
Console.WriteLine("Save PDF compare document: " + comparisonDocumentPDF);
docOriginal.Save(comparisonDocumentPDF, new PdfSaveOptions());
}
See the attached:
TOC Compare 1.docx (38.4 KB)
TOC Compare 2.docx (35.8 KB)
TOC Compare output.docx (37.2 KB)
TOC Compare output.pdf (113.1 KB)