We are replacing word interop functionalities in our project with Aspose Word DotNet library and one of the requirement is having a custom generated sequential page numbers in the right corner header of the document in all pages. So if the document has 10 pages the page numbers could start from 25 and end in 25+10=35. Based on how the document is used each time this starting numbering will change. I am using the code from this below link to read the sections count and assign numbers in a loop of section count. The problem I am facing is the client documents are skipping the first and last page of the document for assigning page numbers. The numbers are getting assigned to the middle pages in sequential order correctly but not getting assigned to the first and last pages.
Please find link and correctly generated document from word interop and wrongly generated document from aspose.
Samples.zip (38.7 KB)