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

Free Support Forum - aspose.com

Word doc page count off by one

We’ve run into a Word doc (attached) where the Aspose page count is off by one. Breaking the doc down, it looks like on page 15 the count is correct, but on page 16 the count says it’s 17 pages. Taking a closer look at the doc, we’re not seeing an obvious problem with it. Can you tell us the problem?

Thank you.

Code used for getting the count:

using (var fileStream = new MemoryStream(fileData))

{

var wordFile = GetAsposeWordDocumentFromStream(fileStream);

contract.PagesCount = wordFile.PageCount;

}



public Document GetAsposeWordDocumentFromStream(MemoryStream docStream)

{

var asposeDocument = new Document(docStream);

return asposeDocument;

}

Hi,


Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 15.3.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-11829. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

Hello,

Any update on WORDSNET-11829?

Thank you.

Hi,

Thanks for your inquiry. Unfortunately, your issue is not resolved yet. Our product team has completed the analysis of this issue and the root cause has been identified. However, because of complexity, the implementation of the fix of this issue has been postponed till a later date. We will inform you via this thread as soon as this issue is resolved. We apologize for any inconvenience.

Best regards,

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.