Doesn't support WMF images
WMF image results in a blank data URI
Sample file here: https://dl.dropboxusercontent.com/u/7000934/PyDocX/WMF%20Image%20Test.docx
@jhubert I believe that your problem is that wmf/emf images cannot be rendered by web browsers. The pydocx library can parse wmf images as another file formats. If this is your problem you should convert this images to a format that browsers can handle (png, jpg, svg).
@IuryAlves You're probably right. My impression of the HTML Exporter is that it would export something useful in HTML. Converting WMF files to something useable in HTML seems like it should be the default behavior to me. I suppose I could just write another mixin.
@jhubert I search a lot for libraries that can convert wmf to png. The best that i found is wand. But the conversion is a slow proccess.
@jhubert Have you done something with this issue? I am about to start a project to convert wmf to png , or svg using imagemagick
I haven't. It wasn't very high priority but would still be useful.
On Sep 9, 2015, 3:18 PM -0700, [email protected], wrote:
@jhubert(https://github.com/jhubert)Have you done something with this problem. I am about to start a project to convert wmf to png images, or svg using imagemagick
— Reply to this email directly orview it on GitHub(https://github.com/CenterForOpenScience/pydocx/issues/166#issuecomment-139060973).
@jhubert Ok. I will start to implement this.
:+1:
@jhubert I want to discuss a solution for this problem with you. I search for python libraries that can convert from wmf/emf to png, but i didn't have success. The solution that i found is to use unoconv. The problems with this solution is that unoconv needs libreoffice to run, and also the unoconv is not importable as a python module, instead, i had to call the unoconv as a subprocess.
OBS: libmagick is another possible solution, but it can only convert from wmf to png
I've dealt with unoconv in the past, and I would recommend avoiding it. It's slow and requires a fairly heavy-weight libreoffice process to start up. It's also a pain to get installed consistently.
OBS: libmagick is another possible solution, but it can only convert from wmf to png
Could something then be used to convert that png to the desired format? I think a double convert would still be cleaner than unoconv.
Getting to would be good enough for me.
On Wed, Oct 7, 2015 at 10:46 AM, Wes Winham [email protected] wrote:
I've dealt with unoconv in the past, and I would recommend avoiding it. It's slow and requires a fairly heavy-weight libreoffice process to start up. It's also a pain to get installed consistently.
OBS: libmagick is another possible solution, but it can only convert from wmf to png
Could something then be used to convert that png to the desired format? I think a double convert would still be cleaner than unoconv.
— Reply to this email directly or view it on GitHub https://github.com/CenterForOpenScience/pydocx/issues/166#issuecomment-146239838 .
@winhamwr some images are in emf format, which libmagick can't convert and also, i search for python wrappers for libmagick and all of them doesn't work correctly with wmf/emf images. Wes Winham, i agree with you, unoconv has issues, but a don't know another alternatives.
@jhubert I will try to release the mixin as far as possible.
How to convert WMF to png?