Microsoft Windows graphics programs frequently attach Enhanced MetaFiles to their documents, usually as an alternative representation of their native format for use as a preview or when embedded into other documents.
Here is a self-contained Perl script that will dump out any EMF embedded in a Microsoft OLE structured document. If it appears to show something useful, contact me and we'll see about converting it into SVG or another vector format.
NEWS 9 Feb 2005: Updated emf_dump.pl to simplify dumping and include all recent EMF records. Now requires OLE::Storage module (see CPAN).
In order to allow me to look at these files, I have built a converter from EMF to Dia XML format.
In principle, this allows Dia users to view MS Visio documents, even when embedded into MS Word - it will rip any EMF it can find out of the OLE streams.
Current version: 1.11 - this is a beta release, which I'm hoping other people will test.
Requirements: Perl 5, GD.pm. Currently tested on Debian GNU/Linux 3.0 only.
Features:
Caveats:
That said, it works well enough for me to be useful. I welcome bug reports sent to emf(at)redferni.uklinux.net - the original file plus a PostScript printout of how it should look is ideal; screenshots or at least the debugging output from the -d flag can still be helpful.
I'm planning to expand this to produce SVG output as well, and possibly PostScript. In the longer term, I'm working on decoding the decidedly fiddly Visio native file format, but it's going to take a while - it's as if they were making it positively difficult to read...
NB I don't own a copy of MS Visio - I'm doing this so I can read the files people send me. Any assistance in decoding the Visio file format would be greatly appreciated - particularly supplying files with known, simple contents from known versions of Visio. Samples exported in the new Visio 2002 XML format would be extremely helpful - I plan to write a converter for this next.
Many thanks to Dia, libwmf for inspiration, O'Reilly's File Format Handbook and, of course Microsoft, without whom none of this would be necessary.