How to convert wmf files to svg files

2019-04-07 09:51发布

How to convert WMF file to svg file? 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.

Please help me 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 saved it to SVG format. This svg format, I will import into another tool, where i can select each circuit and connector for further work.

Thanks Ramm

标签: svg
4条回答
再贱就再见
2楼-- · 2019-04-07 10:29

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#

查看更多
戒情不戒烟
3楼-- · 2019-04-07 10:29

The WMF2SVG project was moved over to SourceForge http://wmf2svg.sourceforge.jp

It works fabulously on my MacBook OS X 10.10.2

查看更多
爷的心禁止访问
4楼-- · 2019-04-07 10:36

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).

查看更多
狗以群分
5楼-- · 2019-04-07 10:43

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

查看更多
登录 后发表回答