com.aspose.words.Document doc = new com.aspose.words.Document(path);
System.out.println(String.format(“com.aspose.words.Document(%s).getPageCount=%s”, org.apache.commons.io.FilenameUtils.getName(path), doc.getPageCount()));
I run the program with this code in several machines. Only my machine get correct results same as MS-Words. All machines use Linux with different distributions, my machine use Ubuntu 18.04 but other machine with same OS as mine still get wrong number. And all use JAVA 8 and above, only my machine use Oracle JDK, others use Open JDK. I tried to change JDK and it’s not work.
Is there a way to fix this? Please advise.