Free Support Forum -

pageCount differs on Ubuntu and Windows 10


We use Aspose.Words version 18.5
For some documents it returns different amount of pages on Ubuntu and Win10, and neither of them is correct.
Our original doc contains 34 pages.
This code:
Document document = new Document(/input stream with document/);
int count = document.getPageCount();

count is 12 on my local machine with Windows 10 v.1703 (without license) and 36 on server on Ubuntu v16.04 (with license)

This error occurred only for one file out of 1000, but file looks ok and can be opened in MS Word.

File is in attachment. (120.6 KB)


Thanks for your inquiry. Please note that in evaluation mode (without applying license) some contents are truncated while importing and exporting document. This is the reason you are getting page count as 12.

We have tested the scenario using latest version of Aspose.Words for Java 18.6 and have not found the shared issue. Please use Aspose.Words for Java 18.6 and make sure that you have installed all fonts used in your document on the machine where you are executing your code.