I've been converting DOCX files to XML-FO using the available code, however none of the images in the original document get converted. There appears to be code to support images, and I've tried with GIF, JPG and PNG.
During conversion I see the following exceptions in the log:
- Code: Select all
java.lang.NoSuchMethodException: For extension function, could not find method static org.docx4j.model.images.WordXmlPictureE10.createXslFoImgE10([ExpressionContext,] #UNKNOWN (org.docx4j.openpackaging.packages.WordprocessingMLPackage), #STRING, #NODESET, #UNKNOWN (java.util.HashMap)).
From what I can gather the second input is for the image handler which is of type ConversionImageHandler, but the type it's using is String. From the docx2fo.xslt it wasn't clear where the $imageHandler is being created. Could this be an issue with my classpath, any help on this would be appreciated. If this might be a bug, I'd be happy to look into trying to come up with a fix but would need a push in the right direction where to start looking at why the imageHandler is different to the expected type.