I am using Aspose.Words.dll (126.96.36.199) in a C# project, and this is my code:
Document doc = new Document(sourceFileName);
int totalPages = doc.PageCount;
I have attached the .rtf document I am using. The document is correctly loaded, but I get a doc.PageCount = 6 (instead the document contains 135 pages). Should I use a different property to get the count of pages for the document?
Thanks for your inquiry. Most likely, you use Aspose.Words in evaluation mode and document is truncated. That is why you get less number of pages than expected. There is evaluation limitation of maximum number of paragraphs in the document. You should see the following text in the output documents.
This document was truncated here because it was created using Aspose.Words in Evaluation Mode.
If you want to test Aspose.Words for without the evaluation version limitations, you can request a 30-day Temporary License. Please refer to