<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>24.3</version>
</dependency>
Document doc = new Document("E:\\test\\wordtopdf\\normal.docx");
//按页数拆分
Document[] splitDocuments = doc.splitIntoPages(5); //每 5 页拆分一次
for (int i = 0; i < splitDocuments.length; i++) {
splitDocuments[i].save("split-part-" + (i + 1) + ".docx");
}