I have modified AddImage.java sample to add WMF image (by simply pointing to load sample WMF file instead of PDF as it is in original sample) and I cannot made it to work.
Sample runs and than it spits with exception:
- Code: Select all
org.docx4j.openpackaging.parts.WordprocessingML.MetafileWmfPart cannot be cast to org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage
If I change sample file to use MetafileWmfPart instead of BinaryPartAbstractImage than there is a problem as MetafileWmfPart class has no methods createImagePart or createImageInline. I think ...