Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the best way to convert from an EPS formatted vector graphic to an SVG formatted graphic using only freely available tools?

share|improve this question

7 Answers 7

up vote 7 down vote accepted

You should be able to open the EPS in inkscape and save as SVG from there.

Make sure to save as Plain SVG not inkscape SVG for better comparability. Adobe illustrator can do the same thing, its not free, but the trial version is.

share|improve this answer
    
I have tried several times to convert an EPS to SVG with Inkskape, and every time it gets the colours and layers all wrong. It's not at all reliable. –  Neil Jun 11 '11 at 14:42
    
Inkscape has a bug with importing EPS files: bugs.launchpad.net/inkscape/+bug/530895 –  Neil Jun 13 '11 at 20:29
2  
It appears that Inkscape bug has since been fixed. –  Brilliand Nov 16 '12 at 17:23

Uniconverter is currently the most convenient option.

It's a command-line tool that shares code with the sK1 Project. You won't have to bother cropping the image in sK1 if you use uniconverter, so it's more automated.

Run it like this:

uniconverter before.eps after.svg

And that's it. I tried it on one EPS, but the SVG was offset improperly, but it may work for you.

Here's a list of alternatives and reasons why they suck:

  1. The sK1 Project

    It has the sense of a "page" that you put your drawing on, so after you import an EPS, you have to move it around and manually crop the page.

  2. ImageMagick

    For EPS to SVG conversion, ImageMagick does some really stupid bitmap conversion and will render SVG files that are 50mb, when they should be a few kb. It doesn't actually have a real vector conversion algorithm for these formats.

  3. InkScape

    Every time I've converted an EPS with InkScape, it's messed up the colours. This is due to an Inkscape bug with importing EPS files.

  4. Gimp

    Gimp just does the same stupid bitmap conversion that ImageMagick does.

  5. Scribus

    It gets the colours of my EPS file even more wrong than Inkscape, while Preview for Mac can read it just fine.

share|improve this answer
    
Did you install it on OS X, and if so, how? Could help this guy out here? How to install Uniconverter (command-line app) on Mac OS 10.7.2 (Lion)? –  slhck Jan 5 '12 at 8:08
    
I didn't install it in OS X. I was testing all of that software in Linux, but merely noticed that Preview on Mac OS X just works. –  Neil Jan 11 '12 at 0:00
    
uniconverter does not preserves linear or radial gradients - after converting it's all solid coloured –  drahnr Aug 3 '12 at 7:37
    
Uniconvertor doesn't support C5D0D3C6-type EPS files (the most common type). Scribus doesn't import half the file on the ones I've tried. Inkscape for Windows doesn't support EPS at all. Just install pstoedit on Linux, and use that (again, the Windows version is broken). –  Mark Jun 30 '13 at 0:23

Currently what's working best for me on linux is the following:

epstopdf foo.eps
pdf2svg foo.pdf foo.svg

I believe the first command is a wrapper for ghostscript, and the second is a wrapper for calls to the Poppler and Cairo libraries. On ubuntu, they're in the packages texlive-font-utils and pdf2svg. Gradients come out looking right, but don't seem to be editable in inkscape.

I tried using inkscape and uniconverter for this purpose, and as of Jan 2013, both seemed broken when tested on an example containing nothig but some very simple line art. Inkscape throws errors and can't open the eps file. Uniconverter crashes.

Scribus and sk1 may work, but seem awkward and not really suited for this task.

share|improve this answer

Actually, opening in Inkscape is only possible if you have Ghostscript installed and some conversion script is in your $PATH$ - I could not get this to work on Windows 7. On Linux, it's easier.

share|improve this answer

You might also want to try Scribus (it does import EPS, it has a solid CMYK support, and I don't know till what extent, but saves as svg) , or, SK1 project. But this last one yet only works in linux. (soon to appear OSX and Windows ports) The difference with Inkscape (for just the conversion) seems to be a better CMYK and other printing features support.

share|improve this answer
1  
I've used Scripus for that. It's sad there's no CLI interface. –  Adobe Sep 5 '12 at 7:44

Ben's solution (with a slight modification: eps2pdf => epspdf):

epspdf infile.eps
pdf2svg infile.pdf outfile.svg

worked flawlessly for me. I am using Ubuntu 11.04. The conversion was fast and it preserved colours perfectly. Thanks to the developers and to Ben for recommending this solution.(I also tried all the other solutions mentioned, but they all failed me because of missing installation dependencies or loss of palette information.)

share|improve this answer

I had much better results with:

ps2pdf -dEPSCrop infile.eps
pdf2svg infile.eps outfile.svg

The resulting SVG was much cleaner.

share|improve this answer
    
Agree, and beauty of the ps2pdf command is that it is installed with ghostscript. The -dEPSCrop EPS parameter was a good tip! Hidden in the doc -> use.htm file. –  V Stuart Foote Aug 31 at 18:22
    
But this way, vector images in eps files created with Illustrator get converted to raster :-( –  gerlos Sep 4 at 11:16
    
Would you be able to link to such a file? I don't have Illustrator. –  Erik Sep 5 at 10:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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