Hi,
I recently encountered a problem where setting the width and height of an image via CSS caused the image to disappear in the converted docx. After tinkering with the code a bit, I noticed that removing the CSS height and width property (in px) would cause the image to show up. Moreover, comparing the docx shows that the cx and cy value of the image becomes 0 in the docx if I set the CSS height and width in the html. Any idea what could be wrong?
I tried to check the source code a bit, I'm not sure if the units are being converted twice. XHTMLImporterImpl.java has addImage function calling UnitsOfMeasurement.twipToEMU once. And then XHTMLImageHandlerDefault.java's addImage function in turn calls BinaryPartAbstractImage.java's createImageInline functon which according javadoc expects the values in twip, and hence calls UnitsOfMeasurement.twipToEMU once more. Seems like the conversion is being done twice.
Any idea if this is a bug or I am missing something in setup?
Thanks,
Jonathan