27

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?

1
  • 1
    You saved my life by making me discover Inkscape. Works much better than AI for creating EMF !
    – iDevlop
    Jun 12, 2013 at 10:36

3 Answers 3

12

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

7
  • Excellent. Just what I was looking for.
    – hlovdal
    Jun 22, 2012 at 13:04
  • This option is not present in Inkscape 0.48.4 :(
    – rumtscho
    Apr 2, 2013 at 17:58
  • 1
    @rumtscho AFAIK it is only available under Windows
    – f3lix
    Nov 14, 2013 at 11:48
  • 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
    Nov 14, 2013 at 12:06
  • 1
    Hmm. This seems to use bitmap export, I'd like to maintain it as a vector EMF file.
    – Jason S
    Mar 28, 2014 at 20:50
23

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

$ inkscape --file <Input-file> --export-emf <output-file>
1
  • 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, 2019 at 15:00
15

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
3
  • 3
    This should be the correct answer today (version 1.0.1) May 29, 2021 at 4:17
  • I tried all online tools in first page of google search "svg to emf", but they add black background while converting this svg to emf. Same is the case of above command.
    – Maha
    Jun 4 at 17:26
  • With inskscape --export-type="emf" myartwork.svg you can skip explicitly naming the output file. Oct 3 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.