We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wrong page number computed for Page field

Hello,

We’ve encountered an issue with page numbers calculation.

Given the attached word document, after calling the UpdateFields() on the document instance the page field from the second page (just under the Lorem Ipsum) has a wrong value. Following is the code used to replicate the issue:

var filePath = “TestFile.doc”;
var doc = new Document(filePath);
doc.UpdatePageLayout();
doc.UpdateFields();
doc.Save(“TestFile-2.doc”);

After running the above code the resulted “TestFile-2.doc” on the second page the highlighted Page field (in red) is computed by Aspose to 3 instead of 2. By manually updating the field in MS Office Word it correctly resolves to 2.

We are using Aspose.Words version 14.1.0.0.

Any feedback will be highly appreciated.

Thank you in advance,
Mihai Andrei
Senior Software Engineer
IBM Romania

Hi Mihai,


Thanks for your inquiry. After an initial test with Aspose.Words 14.2.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

I hope, this helps.

Best regards,

Hello,

We’ve tested against Aspose.Words 14.3.0.0 and the problem seems to be solved in this version.

Thank you,
Mihai Andrei

Hi Mihai,

Its great the latest version resolves your problem. In case you have further inquires or need any help, please let us know.

Best regards,