Please ZIP and upload your source Word document you are getting this problem with here for testing. We will then investigate the issue on our end and provide you more information.
After an initial test with the licensed latest (21.6) version of Aspose.Words for .NET, we were unable to reproduce this issue on our end. Can you please also create a standalone simplified Console Application (source code without compilation errors) that helps us to reproduce this problem on our end, compress it into ZIP format and attach the .zip file here for testing? Please do not include Aspose.Words DLL files in it to reduce the file size. We will then start further investigation into your issue and provide you more information.
I tried creating console application and page count returned is correct.
Ours is an API application (web application), but our API application is returning wrong page count. 4.6.1 is the .net framework. As far as I reviews project settings are same for both the projects.
Is there something specific for web applications that I have do…
both the applications are pointing to same word document.
Found the cause, we are using both Aspose.PDF and Aspose.Words within same function call
license (SetLicense()) was ONLY set for Aspose.PDF and we are calling functions within “Aspose.Words” without setting license for Aspose.Words
We updated code to set license for both Aspose.PDF and Aspose.Words within same function.
By setting both license files we are now getting correct page count of word documents.
Yes, you need to set the license separately for each Aspose API that you are using. 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.