See the attached document. This document was created with ASPOSE.WORDS and saved with
Notice that paragraphs 1.9 and 1.10 have the page number as being 1-15. If you open the document and update those fields, you’ll see it should be 1-16.
This is reproducible by opening this file and resaving it:
Aspose.Words.Document d = new Aspose.Words.Document(@"C:\temp\KC-130J2021-11-16T18_16_06.docx"); d.CompatibilityOptions.OptimizeFor(Aspose.Words.Settings.MsWordVersion.Word2019); //Page numbers are correct when this line is commented out d.UpdatePageLayout(); d.UpdateFields(); d.Save(@"C:\\temp\\out2.docx");
Note that when the
OptimizeFor is commented out, the page numbers are correct.
KC-130J2021-11-16T18_16_06.docx (62.0 KB)