Thread subject: sK1 Project :: WMF/EMF files don't convert, 8 example files within

Posted by holloway on 30-10-2010 11:27
#1

Hi the following files aren't detected and don't convert,

http://holloway.co.nz/uniconverter/1.wmf
http://holloway.co.nz/uniconverter/2.wmf
http://holloway.co.nz/uniconverter/3.wmf
http://holloway.co.nz/uniconverter/4.wmf
http://holloway.co.nz/uniconverter/5.wmf
http://holloway.co.nz/uniconverter/6.wmf
http://holloway.co.nz/uniconverter/7.wmf
http://holloway.co.nz/uniconverter/8.wmf

On Ubuntu 10.10 running 'file' on them reports that they are "Windows Enhanced Metafile (EMF) image data version 0x10000".

wmf2svg and wmftosvg* are unable to convert them. Uniconvertor on Ubuntu 10.10 says

Code

/usr/lib/pymodules/python2.6/uniconvertor/app/utils/locale_utils.py:9: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  from popen2 import popen2
No plugin-type information in /usr/lib/pymodules/python2.6/uniconvertor/app/plugins/Filters/__init__.py
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/uniconvertor/__init__.py", line 82, in uniconv
    doc = load.load_drawing(input_file)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 364, in load_drawing
    return load_drawing_from_file(file, filename)
  File "/usr/lib/pymodules/python2.6/uniconvertor/app/io/load.py", line 346, in load_drawing_from_file
    raise SketchLoadError(_("unrecognised file type"))
app.events.skexceptions.SketchLoadError: unrecognised file type





OpenOffice 3.2.1 on Ubuntu 10.10 renders the files correctly (you can open these wmf files directly).

If there's anything else I can do to help with this bug report let me know.

(*) see http://www.argentum.freeserve.co.uk/wmftosvg.zip

Posted by igor on 30-10-2010 17:53
#2

Hi!

Thank you for your bugreport.

You have tried to convert EMF files but UniConvertor doesn't support this format. WMF and EMF are different vector graphics formats. Application recognizes file format analyzing file content but not file extension. Therefore you got "unrecognised file type" exception.

Edited by igor on 30-10-2010 17:53

Posted by holloway on 30-10-2010 19:25
#3

Ah, my mistake. Thanks for letting me know, cheers!

Posted by holloway on 02-11-2010 00:27
#4

I don't suppose you know of an EMF to PS or PDF or SVG converter do you? It seems that there are no EMF converters available on Linux.

I tried your pymfvu.py (which is discontinued according to Wikipedia) and it could display the EMF files although the text size was far too large. From looking at the Python source code it seems it hasn't implemented the SVG save yet so I don't think it could work.

OpenOffice supports EMFs very well but I'm having problems scripting that software (see: http://www.oooforum.org/forum/viewtopic.phtml?t=109519 ).

FreeHep (Java) claims to have an EMF2SVG implementation but it doesn't have any command line tools and I don't know Java.

I know this is a bit offtopic so feel free to delete this post if it's not appropriate but if there's any advice you can give I'd appreciate it.

vvvv Thanks :)

Edited by holloway on 03-11-2010 20:24

Posted by igor on 02-11-2010 18:48
#5

In other words, your post should be regarded as a request to support EMF format :)
I have added this issue into project bugtracker;

http://code.googl...tail?id=16