Command line tool to convert SVG to EMF (Enhanced Metafile)

20

6

I know I can use Save as in Inkscape to convert from SVG to Enhanced Metafile (EMF). But if I have several files this is a bit cumbersome. Is there a command line tool I could use instead?

hlovdal

Posted 2012-06-22T08:22:01.523

Reputation: 2 760

You saved my life by making me discover Inkscape. Works much better than AI for creating EMF ! – Patrick Honorez – 2013-06-12T10:36:45.903

Answers

9

Looks like you can use inkscape from the command lone to do this with the -M switch.

http://tavmjong.free.fr/INKSCAPE/MANUAL/html/CommandLine-Export.html

Nick R

Posted 2012-06-22T08:22:01.523

Reputation: 106

@Jason Just tested on OSX and it creates a vector emf for me. – rac2030 – 2016-03-04T08:49:26.840

Some notes: the options can not be set on cli but it will use the last settings that have been used from gui – rac2030 – 2016-03-04T08:50:27.813

Excellent. Just what I was looking for. – hlovdal – 2012-06-22T13:04:15.177

This option is not present in Inkscape 0.48.4 :( – rumtscho – 2013-04-02T17:58:43.880

1@rumtscho AFAIK it is only available under Windows – f3lix – 2013-11-14T11:48:43.093

1@f3lix I don't remember the circumstances of making this comment, but there is a good chance I was on Linux. I was going to ask you how to do it on Linux then, but I guess this is offtopic enough to merit its own question. – rumtscho – 2013-11-14T12:06:59.737

1Hmm. This seems to use bitmap export, I'd like to maintain it as a vector EMF file. – Jason S – 2014-03-28T20:50:17.907

19

If you want the exact command to do this here it is:

$ inkscape --file <Input-file> --export-emf <output-file>

gst

Posted 2012-06-22T08:22:01.523

Reputation: 308

Side comment: You might want to install sudo apt-get install libcanberra-gtk-module to overcome the Failed to load module "canberra-gtk-module" Gtk-Message which is shown every time one executes the command. – JJD – 2019-06-10T15:00:22.303