[solved] Can't import .wmf files cleanly

Post questions on how to use or achieve an effect in Inkscape.
User avatar
ULANDREMAN
Posts: 4
Joined: Fri Jul 11, 2008 7:09 am

[solved] Can't import .wmf files cleanly

Postby ULANDREMAN » Fri Jul 11, 2008 7:22 am

Is there a trick to importing .wmf files?
Whenever I import one, it comes in upside-down and backwards or otherwise topsy turvy.
I'm working in Windows XP.

Is there some documentation that explains the work-around?

Urban Landreman

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Can't import .wmf files cleanly

Postby microUgly » Fri Jul 11, 2008 9:06 am

I haven't tried opening a WMF file, so I'm not sure how good Inkscapes support is for the format. But my advise for anyone trying to open a file format other than SVG or PDF is to convert it to a PDF then open it. You can convert your WMF files to a PDF at http://convert.neevia.com/

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Can't import .wmf files cleanly

Postby sas » Fri Jul 11, 2008 7:16 pm

Years ago, I wanted to convert WMF files to SVG, but couldn't find a converter that produced decent output, so I wrote my own: WMFtoSVG source code and documentation. If you want to try this, please read the documentation first (the file README.txt). On Windows, you can ignore the installation instructions and just download the WMFtoSVG .exe file (but you still need to read the rest of the documentation). Please let me know if you find any bugs.

User avatar
ULANDREMAN
Posts: 4
Joined: Fri Jul 11, 2008 7:09 am

Re: Can't import .wmf files cleanly

Postby ULANDREMAN » Sat Jul 12, 2008 12:54 am

I tried the wmftosvg.exe utility.
When I tried converting my first .wmf file, I got the message:
"unsupported function: 0x020E <SetViewpo9rtExt>, conversion aborted"

Have you seen this before?
Since all my .wmf files are created by the same process, is it likely that I'll get this message for all of my files?

Thanks.

Urban Landreman

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Can't import .wmf files cleanly

Postby sas » Sat Jul 12, 2008 2:06 am

ULANDREMAN wrote:"unsupported function: 0x020E <SetViewpo9rtExt>, conversion aborted"

Have you seen this before?

No, I don't think so. I have a list of files that WMFtoSVG won't convert, with reasons for the failure, and none of them mention SetViewportExt.

Since all my .wmf files are created by the same process, is it likely that I'll get this message for all of my files?

Yes, that's quite likely.

I could probably add support for SetViewportExt (and SetViewportOrg) if I had some sample files to test with.

User avatar
ULANDREMAN
Posts: 4
Joined: Fri Jul 11, 2008 7:09 am

Re: Can't import .wmf files cleanly

Postby ULANDREMAN » Sat Jul 12, 2008 2:18 am

I'll be happy to give you access to an example .wmf file which is giving me the error message.
I don't see a way to upload files in this forum. Am I not looking in the right places?
Other suggestions?

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Can't import .wmf files cleanly

Postby sas » Sat Jul 12, 2008 4:00 am

ULANDREMAN wrote:I don't see a way to upload files in this forum.

You can't upload files here. The thread Where can I upload my images? suggests using MediaMax or MediaFire as file hosts.

Alternatively, you could file a bug report on the problems you are having importing WMF files into Inkscape, and attach some sample files there. That's a good thing to do in order to help Inkscape improve - and I could use the files to improve WMFtoSVG too.

User avatar
ULANDREMAN
Posts: 4
Joined: Fri Jul 11, 2008 7:09 am

Re: Can't import .wmf files cleanly

Postby ULANDREMAN » Sat Jul 12, 2008 4:56 am

Thanks for your offers to help.
A typical file that I've been working with is available for download at:
http://www.mediafire.com/?yt8dmzivthz

Thanks again.

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Can't import .wmf files cleanly

Postby sas » Sat Jul 12, 2008 8:59 pm

I've uploaded a new version of WMFtoSVG that should be able to handle these files (same URLs as before - see my earlier post above). It will produce warning messages for the SetViewportExt and SetViewportOrg, because it currently just ignores them - but that's not a problem for your sample file, and I doubt it will be a problem for your other WMF files.

I've also added a command-line option --write-size which will produce SVG files that work better with Inkscape. So suggested usage is something like this:

wmftosvg --write-size in.wmf > out.svg

(The Inkscape bug that this circumvents is now fixed, but was still present in 0.46.)


Return to “Help with using Inkscape”