I've now spent some time investigating various options for converting EMF and WMF files to SVG and/or PNG.
The options I looked at were the ones listed earlier in this thread, plus 2 others:
I tried them using EMF and WMF files created by saving shapes from Powerpoint 2007 (either Save as Picture .. on the object itself, or Save As .. for the document, then saying just the slide)
My conclusion is that there is no simple solution. It would be nice to be able to use com.adobe.dp.office, since it has both EMF and WMF parsers, but its EMF parser needs a lot of work.
wmf2tosvg is a good solution for WMF, but it has no EMF support. For WMF, I'm inclined to use wmf2tosvg
. This can be revisited if/when com.adobe.dp.office improves.
What to do about EMF?
FreeHEP has EMF2SVG, but the output wasn't much good (perhaps because office drawings aren't its primary focus). It would also be a very complex dependency.
Batik has WMFTranscoder, but not EMFTranscoder! It looks like one could be added from package org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.metafile with a bit of work, but still, batik is no good on appengine since it uses awt, and spawns threads. So avoid it..
imagemagick does a nice job with WMF, but has no support for EMF at all (other than on Windows).
openoffice can be used to convert EMF and WMF; I found it worked well. Until the EMFParser in com.adobe.dp.office is fixed, this may be a good option (depending on your environment). Maybe the code to use openoffice for EMF conversions could go in src/docx4j-extras, so only those who wanted to use it would need to worry about the dependencies.
I'll explore using svgsalamander for PNG output (as an alternative to Batik) - though this too requires AWT