I would just like to say that I got this working.
First, I had to follow the normal instructions for getting it to work on Android as found here:
http://www.docx4java.org/blog/2012/05/j ... n-android/and here
https://github.com/plutext/AndroidDocxToHtmlTake the jar files from the AndroidDocxToHtml libs folder and use those in your own project.
To get images working, I used the jar files from this SO answer by kirik88
http://stackoverflow.com/questions/2332 ... e/23647090But after all of this, I was running into the method limit with dex files. So I enabled proguard on debug - add
debug {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
to your build types entry (under the android entry) in build.gradle for your module.
Next, I had to go into proguard and set things up there. Here is the contents of my proguard file:
-libraryjars "libs/activation.jar"
-libraryjars "libs/additionnal.jar"
-libraryjars "libs/ae-awt.jar"
-libraryjars "libs/ae-docx4j-2.8.0-SNAPSHOT.jar"
-libraryjars "libs/ae-jaxb-2.2.5.jar"
-libraryjars "libs/ae-xmlgraphics-commons.jar"
-libraryjars "libs/commons-codec-1.3.jar"
-libraryjars "libs/commons-io-1.3.1.jar"
-libraryjars "libs/commons-lang-2.4.jar"
-libraryjars "libs/commons-logging-1.1.1.jar"
-libraryjars "libs/gson-2.2.4.jar"
-libraryjars "libs/istack-commons-runtime.jar"
-libraryjars "libs/JAXBNamespacePrefixMapper-2.2.4.jar"
-libraryjars "libs/jaxp-datatype.jar"
-libraryjars "libs/log4j-1.2.15.jar"
-libraryjars "libs/txw2-20110809.jar"
-ignorewarnings
-dontobfuscate
-keep class ae.com.sun.** { public protected private *; }
-keep class ae.javax.** { public protected private *; }
-keep class org.apache.** { public protected private *; }
-keep class org.docx4j.** { public protected private *; }
-keep class org.opendope.** { public protected private *; }
-keep class com.sun.** { public protected private *; }
After that, I was able to build and run normally and use the guides for adding images/tables/etc to a new word document.
Cheers. If anyone has any questions about this, please PM me or email
drew.coleman@covan.com