11

How to convert a WMF file to SVG? I have around 550 WMF files to be converted to SVG format.

For one file, I opened the WMF file in Visio and saved it as SVG format, but to convert around 550 files is a tedious process.

Actually, these WMF files are the converted files from the PDF document. So, any better way to convert the PDF image to an SVG image? Currently, I converted the PDF schematic diagram into WMF and opened it with Visio, so that I can select each circuit or connector by ungrouping and later saving it to SVG format.

This SVG image I will import into another tool, where I can select each circuit and connector for further work.

Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
user301016
  • 2,207
  • 7
  • 36
  • 50

5 Answers5

4

I'll just add a link to the Free EMF/WMF to SVG File Convert Tool 2.0 for future reference.

http://visualstudiogallery.msdn.microsoft.com/dc4e0116-a730-45d2-ae9f-03be676817ea

and the WMF2SVG project over at Github:

https://github.com/hidekatsu-izuno/wmf2svg

user568451
  • 59
  • 1
  • 8
4

For batch processing WMF to SVG you can use Inkscape. You must use the command line. Start it with inkscape --shell.

Then to convert automagically use:

inkscape yourfile.wmf --export-plain-svg=yourfile.svg.

To make your life easier, here is a BATCH skript. Create a text file, name it wmftosvg.bat and place it into the folder with all wmf files. The content of the file:

@ECHO OFF

echo.
echo.
echo.   Enter graphic format (like wmf):
echo.
set /p Input1=   Graphic file type:  
echo.
echo.

FOR %%I IN (*."%Input1%") DO (
    setlocal enabledelayedexpansion
    C:\Portables\InkscapePortable\App\Inkscape\inkscape "%%~nI.!Input1!" --export-plain-svg="%%~nI".svg
)

With the script above you can convert arbitrary graphics to SVG. Just enter the graphic format (file extension).

Avatar
  • 14,622
  • 9
  • 119
  • 198
0

The WMF2SVG project was moved over to GitHub https://github.com/hidekatsu-izuno/wmf2svg

It works fabulously on my MacBook OS X 10.10.2

Per Christian Henden
  • 1,514
  • 1
  • 16
  • 26
Nora Heuer
  • 84
  • 6
0

I used the wmf2svg Java project to convert a load of old wmf files.

Wrote a little bash script to convert all the files in my folder to .svg

shopt -s nullglob

for file in *; do
  fname="${file%.*}.svg"
  java -jar wmf2svg-0.9.11.jar $file $fname
done
JoSSte
  • 2,953
  • 6
  • 34
  • 54
0

If you are familiar with C#/.NET you can use WMF library from CodePlex to create a converter to SVG. Since WMF supports only basic shapes (line, rectangle, polygon, arc) and no layers nor element nesting it should be quite easy to convert as SVG supports all those features and more.

Also check out this question: WMF / EMF File Format conversion C#

Community
  • 1
  • 1
Papn Kukn
  • 156
  • 1
  • 3