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

Free Support Forum - aspose.com

Document.PageCount is not accurate

I have the attached Word document. I instantiate a Document object based on it and I’m trying to get the total pages number. The document has 4 pages, but the document.PageCount is 3. Is this a bug? Why is the PageCount equal to 3 when there are 4 pages in the document?

Hi,


Thanks for your inquiry. I have tested the scenario and have not found the shared issue while using latest version of Aspose.Words v13.6.0. I would suggest you please upgrade to the latest version of Aspose.Words (i.e. 13.6.0) from the following link:
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

I figured it all out. The problem was that I was previously modifying the section’s PageSetup margins and that made the document content re-organizing on pages. I tested it with 13.4 and it’s ok. My bad.
Thank you for your support.

Hi,


Thanks for your feedback. It is nice to hear from you that your problem has been solved. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.