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

Free Support Forum - aspose.com

Document.PageCount still returns Incorrect Value

a few months ago ,i reported a bug :

this bug was fixed at 2021.08 version…

now i got another bug:

1234.docx (798.1 KB)

var doc = new Aspose.Words.Document(fileFullName);
var pageCount = doc.PageCount;

this time ,pagecount is 1 which is incorrect. the correct value shoule be 2.

please help me to reslove this issue.


After an initial test with the licensed latest (21.10) version of Aspose.Words for .NET, we were unable to reproduce this problem on our end. I have also converted DOCX to PDF and you can see 2 pages in Aspose.Words generated PDF as well (see 21.10.pdf (865.3 KB)). So, we suggest you to please upgrade to the latest (21.10) version of Aspose.Words for .NET.

hi ,thank you for your help.

i found the reason , becuase there are few problems on my docx file, so after i used aspose.word.document.save api to fix these issues, then i use the api ,the api is now returning correct page count.

this solution is working on both 2021.08 and 2021.10 versions.


It is great that you were able to resolve the problem on your end. In case you have further inquiries or may need any help in future, please let us know by posting a new thread in Aspose.Words’ forum.