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

Free Support Forum - aspose.com

Document.PageCount Returns wrong page count

I am evaluating aspose for a project and got into issue in PageCount function.
Downloaded Aspose.Words in Nuget and 19.11.0.0 is the version. Using it in c# application.

If I get page count for sample word document its giving correct count, but If i give production real document which we will be using in live and its giving wrong count .
Means : It has only 1 page but Document.PageCount returns 2. If I add more contents to the same document upto 3 pages then PageCount returns 4. Its adding extra 1 page .

Same document return correct page using Microsoft.Office.Interop.

Attached test file.

@baskerganesan

You are using Aspose.Words in evaluation mode. So, you are facing this issue. Please note that in evaluation mode there are some limitations applied. E.g. Aspose.Words injects an evaluation watermark at the top of the document. The document’s content are truncated after a certain number of paragraphs during import or export.

Please get 30 days temporary license and apply it before using Aspose.Words’ classes.

If you still face problem, please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.

After applying temp license. Now its returning correc count. Thanks.

This usually happens when the license file is missing or is not is not properly set.

@baskerganesan

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.