28

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
  • 3,048
  • 4
  • 32
  • 39
  • 1
    You saved my life by making me discover Inkscape. Works much better than AI for creating EMF ! – iDevlop Jun 12 '13 at 10:36

3 Answers3

23

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

$ inkscape --file <Input-file> --export-emf <output-file>
gst
  • 366
  • 2
  • 8
  • 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 Jun 10 '19 at 15:00
16

With Inkscape 1.0 the commands changed. And since this is the top Google result, I thought it might be worth to update the answer:

inkscape filename.svg --export-filename filename.emf
Azrael_DD
  • 161
  • 1
  • 4
  • 3
    This should be the correct answer today (version 1.0.1) – Constructor May 29 '21 at 04:17
  • I tried all online tools in first page of google search "svg to emf", but they add black background while converting [this](https://drive.google.com/file/d/1glhwDJsjiDNLF3flmpgtIVfurum29xcQ/view?usp=sharing) svg to emf. Same is the case of above command. – RajS Jun 04 '22 at 17:26
  • With `inskscape --export-type="emf" myartwork.svg` you can skip explicitly naming the output file. – matt wilkie Oct 03 '22 at 19:41
13

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
  • 146
  • 1
  • 2