When I try adding a bitmap (.bmp) to a word document, as per the examples, I get exceptions as below. It appears from looking at the source code ( BinaryPartAbstractImage.java@1541, line 311 onward) that .bmps are not in the list of natively supported image types for Word. I think they are supported, are they not? So, should they not be included in this case/list?
Thanks,
LTC
---------------------------------
WARNING: org.docx4j.openpackaging.exceptions.Docx4JException: Error checking image format
at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.ensureFormatIsSupported(BinaryPartAbstract
Image.java:320)
at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.createImagePart(BinaryPartAbstractImage.ja
va:192)
at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.createImagePart(BinaryPartAbstractImage.ja
va:154)
... more stack trace ...
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Cannot run program "imconvert": CreateProcess error=2, The system cannot find the file specif
ied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.convertToPNG(BinaryPartAbstractImage.java:
792)
at org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage.ensureFormatIsSupported(BinaryPartAbstract
Image.java:306)
... 44 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.$$YJP$$create(Native Method)
at java.lang.ProcessImpl.create(ProcessImpl.java)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
... 49 more