Incorrect page numbers

Hi Aspose,

Seems that UpdatePageLayout() method doesn’t use margins or line spacing information for it’s work.
The page numbers are incorrect.

Please see result.docx attached, pages 27, 28, 40 - highlighted text. (149.6 KB)

Source code:

    var document = new Document("C:\\test.docx");

  	var builder = new DocumentBuilder(document);

  	var insertedFields = new List<Field>();

  	foreach (var paragraph in document.GetChildNodes(NodeType.Paragraph, true))
  		Field insertedField = builder.InsertField(@"PAGE", "1");


  	insertedFields.ForEach(field => field.Update());

  	document.Save("C:\\result.docx", SaveFormat.Docx);



Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-17255. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-17255) have been fixed in this Aspose.Words for .NET 19.4 update and this Aspose.Words for Java 19.4 update.