Free Support Forum -

Aspose.Words Page Count Appears to be Wrong


There appears to be a problem with page counting when there are tables invovled. I’m not entirely sure if its the tables that causes the problem, but I haven’t been able to replicate it without them.

I’ve attached a document that has 6 pages when opened in Word. However, when loading the document and checking the page count, I get 5.

var doc = new Document(“TestDocumentWithTables.docx”, new LoadOptions() { LoadFormat = LoadFormat.Docx });
var docPageCount = doc.PageCount; // =5

This also become apparent when I render the pages as images (using RenderToSize). All the nodes are visible, but the pages breaks appear in the wrong place and data overlaps the footer in some cases.

When I save the document back as another Word doc, however, it appears fine again. But saving as another format such as PDF (see attached also) or an image format, the problem becomes apparent again.

Anything I’m doing wrong? Or is there a known bug perhaps?


Thank you for reporting this problem to us and for the additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Best regards,

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan