document.extractPages giving exception

Hi team,

Getting below mentioned exception while using document.extractPages().

class com.aspose.words.StructuredDocumentTag cannot be cast to class com.aspose.words.Table (com.aspose.words.StructuredDocumentTag and com.aspose.words.Table are in unnamed module of loader ‘app’)

PFB the complete function:

private List<Document> splitDocumentWithAspose(Document document, int noOfSplits, int totalPageCount) throws Exception {
        log.info("splitDocumentWithAspose - split document into {} sub-document", noOfSplits);
        List<Document> documents = new ArrayList<>();
        for (int split = 0; split < noOfSplits; split++) {
            int startIndex = split * 10;
            int endIndex = startIndex + 10;
            int count = totalPageCount > endIndex ? 10 : (totalPageCount - startIndex);
            Document splitDoc = document.extractPages(startIndex, count);
            log.debug("splitDocumentWithAspose - adding splitted document at position {} into documentList", split);
            documents.add(splitDoc);
        }
        log.info("splitDocumentWithAspose - total number of split documents are: {} ", lazy(documents::size));
        return documents;
    }

Attaching document:
Feya Textiles_01_08_2024_Final.docx (155.0 KB)

noOfSplits = 5, totalPageCount=41.

@SATISHSATYAEESH
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27266

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSNET-27266) have been fixed in this Aspose.Words for Java 24.9 update.