This question is quite old, but since I had the same problem and have been looking for a solution for a long time, I would like to point out these two free options:
https://github.com/centic9/poi-on-android
This allows you to create a custom Apache POI.jar file with only the necessary parts of the POI for your task, since the POI can also process other types of documents.
To enable word processing with image processing for a custom jar, you will need to remove the following lines from the build.gradle file in the poishadow folder:
exclude 'org/apache/poi/wp/**' exclude 'org/apache/poi/xwpf/**' exclude 'org/openxmlformats/schemas/drawingml/**' exclude 'org/openxmlformats/schemas/wordprocessingml/**'
Then create the project in accordance with the documentation specified in the README of the project. This is necessary because the standard POI does not start on Android out of the box due to some unsupported dependencies (javax, etc.) and the number of method limitations.
An alternative would be https://github.com/leonardoanalista/java2word , which is also not optimized for Android, but has almost no dependencies and can be made to run on Android. It is capable of creating .doc files, but it is very easy to work with and configure with it (to support images on Android, it takes a little effort to base64 encode them on Android). This solution has some limitations when it comes to files with a large number of images, as the files become quite large.
Steve source share