I am trying to get page count from office document on Android using Aspose:
try {
Document doc = new Document(path);//such as: "/storage/emulated/0/Download/Document.docx"
//Get page count
int pageCount = doc.getPageCount();
} catch (Exception e) {
e.printStackTrace();
}
However, application stops due to fatal exception: java.lang.NoClassDefFoundError: com.aspose.words.Document
I am using jdk-1.7 and I have downloaded aspose-words-1.12-android. Please advise.
Thanks, the issue was because I didn't include apk file into assets folder which should be done starting from 1.11 release. I just followed the post