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

Free Support Forum - aspose.com

Wrong number of pages

Hi,


I’m trying to get the number of pages in a Word document and the returned number is always wrong i.e. much to low.

Document doc = new Document(fileName);
doc.updatePageLayout();
int pageCount = doc.getPageCount();

There are 34 pages in document when opening in Word and pageCount is 11.




tested with Aspose.Words (Java) 15.10
Hi Sebastian,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 17.1.0 and have not found the shared issue. Please use Aspose.Words for Java 17.1.0.

Tahir,


I applied the wrong license path and swallowed the exception.

Shame on me and sorry for your time!



Thanks,
Sebastian