Inkscape AI compatible EPS exporter

Edit: I moved the script to GitHub, go there for latest information and downloads.

This script converts an Inkscape SVG to Adobe Illustrator 7 compatible EPS. The generated EPS file uses custom Illustrator PS operators, and includes PostScript processes that stands in place of said operators when the file is not opened with Adobe Illustrator.

The script exports layers, groups, paths, clones, clipping paths, fill, stroke, gradient fill into a format that Illustrator understands.

Warning

This script is not extensively tested. Since its dual nature, it is possible, that the result looks different in Illustrator than in other programs.

I wrote it to upload clipart to microstock sites: I’ve already uploaded a dozen images exported with this script and they were all accepted.

Installation

Download this file, and copy aieps_output.inx and aieps_output.py into the Inkscape extensions folder:
If you are using Windows C:\Program Files\Inkscape\share\extensions
If you are using Linux /usr/share/inkscape/extensions

Reporting issues

Please report issues using the project’s github issue tracker, and upload a minimal SVG file that can reproduce the error.

60 Comments

  • Debspoons (Debra) says:

    Thank you for providing this. I have downloaded and will try this..I am always amazed at some of the art work that can be done with programs I can not afford. This Inkscape eps file will get me a step up on the ladder. I hope that you will let me ask some questions, if I have any problems.
    Thank you again,
    Debspoons

  • Debspoons (Debra) says:

    This is my experiment..It has been accepted as an eps file..

    http://www.canstockphoto.com/red-chickens-22295593.html

    • arip says:

      how about fotolia,shutterstock,gettyimages have you tested too?
      i need your answer so much….
      thanks for great scripts

  • Debspoons (Debra) says:

    I just got a new laptop and I can not install this program on to it…
    because of windows 8?

    C:\Program Files (x86)\Inkscape\share\extensions\

    can not open ….2 errors

    • Prim András says:

      Sorry, that I did not reply, but I was ill.
      I cannot really help you with that (maybe next week I can find a windows 8).

  • Jan says:

    Hi, I would if I was being counseled. I downloaded and installed the script, but unfortunately my script gradients cancel out. I OpenSuse 13.1 I tried Inkscape 0.48 and 0.91.
    thank you
    Jan

  • plifendm says:

    Thank you. It seems the coolest solution. But, still can not unzip the contents into the Inkscape extensions folder in windows 8. Waiting for the win 8 version. Thank you.

  • George says:

    It works although there’s a small visible white line which appeared as an artifact in the image I tested.

    • Prim András says:

      The script automatically closes filled objects, maybe that caused the white line?

  • hajakely says:

    This script works for me like a charm
    inkscape 0.91, Debian Jessie.
    Thanks a lot!!

  • john says:

    Hello,

    How does this script work?
    I have copied the files in the folder as described in “Installation”.
    Now what?
    I can not find the ai extension in the save dialog, nor in the extensions section.

    • Prim András says:

      It should appear in the save dialog’s type dropdown menu as Encapsulated PostScript – AI compatible (*.eps). If it doesn’t, then unfortunately I do not know, what went wrong.

  • Feuerbach says:

    Thanks for the great plugin! It helps beginners who start to sell stock illustrations a lot. I’ll put a link on my website. 😉

  • Ibnu says:

    Thanks million for this amazing work! very helpful, I spend many days for searching this solution, and finally arrived to this website. Great work!

  • mike says:

    Wonderful! Unfortunately, AI8 specs is not available in order to export gradient meshes too…

    • Prim András says:

      Thanks. Actually, I didn’t even know, that inkscape can do gradient meshes.

      • mike says:

        Yes, since 0.91 it was implemented (probably not yet fully) the SVG v2 gradient mesh specification. The 0.92 nightly builds support exporting to EPS, Illustrator seems to read these, but it behaves as in case of simple gradients exported by Inkscape in EPS. Adobe cheats. Last time I’ve checked, they were saving even in svg their code, so if somebody edits the svg in other tool, the Illustrator don’t parse that, it reads only what it put in the svg, his format, so the file appears unchanged.

        • Prim András says:

          Earlier versions of inkscape also had EPS export, but they saved gradients as EPS gradients, and Illustrator (at least the version I used) opened those rasterized.

          • mike says:

            I confirm, Illustrator CC 2015.3 (the latest to date) behaves the same.

  • ceeg says:

    Thank you very much for this! I spent hours breaking my head over the problem where layers from Inkscape’s EPS weren’t correctly opening in AI and your extension was the solution!!

  • FreeCreators says:

    Great great software!! I am trying to start a microstock career, so to speak. and this extension helps to make it possible.
    All my exported .eps files are made with this extension, and they are accepted.

    If I may point out some possible improvements.

    I tested the extension with CorelDraw X7 and Microsoft Expression Design 4, got the same results

    as long as no gradients are used it is ok, using gradients results in a file not opening or just coloring all the artboard

    so for now i am not using gradient, but they are such a cool feature to use

    thanks again, great work 🙂

  • lutfee says:

    thanks a lot, its great,

  • Ahmad says:

    This is script is not have copyright right, so can i download it and use it?,because i don t want using something illegal, thankyou

    • Prim András says:

      You can use it however you like. Most of it is “I don’t care” licensed, the hard mathematical portion is MIT licensed.

  • Dee says:

    hi. Thanks so much for this extension. I don’t have a Linux folder. I use windows 7. I tried creating a new folder (where Linux should be) but I can’t seem to unzip your files there. Should I be doing something different since I use Windows 7? thx
    dee

  • Great script… I got many vectors with gradient fill accepted on SS saved using this script.

  • karusawa says:

    Thanks so much for this extension.but it not work when I open EPS file on Illustrator cc 2017.

  • Annabella Keszi says:

    OMG, I’m so happy I’ve found this, I was looking for a solution for so long!!! Thank you! I have one question though. I have a graphic in Inkscape at 1600x1600px size, artboard is the same size. When I open the eps file either in Illustrator CS6 or in Inkscape, the graphic’s and the artboard’s sizes are different, and none of them matches the original size. Also, they are a different size in Inkscape and Illustrator. Is there any setting in Inkscape that could prevent this? What am I missing? Thanks

    • Prim András says:

      I tested it with some simple files, and I did not get this problem. If you send me your file I might be able to find out some workaround.

      • Annabella Keszi says:

        Lüke vagyok, elsőre valahogy nem tűnt fel, hogy magyar vagy. Nagyon köszönöm, hogy megnézted 🙂

        I tried a couple of things and found out that the problem was that I created the graphics in Inkscape 0.92 before I tried to save the eps from 0.91. When I copied the elements into a fresh new 0.91 version file it worked. The artboard is the same size as the graphics. I couldn’t check in Inkscape though, because it opens all eps files as blank page (except that mentioned strange one – I couldn’t figure this one out yet, but this is a different story). In Illustrator everything is 80% size now, but I read somewhere, that it’s probably because of the 72 dpi / 90 dpi difference, that’s fine. Thanks again.

  • thekorp says:

    Thanks a lot man, You’re awesome.

    can i share your script to Shutterstock Thailand Contributors FB page?

  • Boy says:

    hi! can you fix that for windows 8 ?
    when i export layers to eps.
    gradient don’t work.

    • Prim András says:

      Sorry, but I don’t have energy to work on this script now, and I don’t have windows 8. But if you can send me a problematic SVG, I might be able to find a workaround. (gimme_at_primandras.hu)

  • Ahmad adhy says:

    I am sorry I just want to ask you, is it allowed to you, or is it legal for you to modify EPS format file, is that EPS format file dont have any license? Thank you

    • Prim András says:

      I don’t know about any legal limitations about this format. I wrote this script based on documentation openly available (at that time) on Adobe’s website, so I think we are on the safe side.

  • BlackSparta says:

    Hi! is the gradient work with old or new version of Inkscape? are you using a legal (original) version of Windows?

    • Prim András says:

      Dude, you don’t just walk around the internet and ask random people whether they are committing crime! Anyway, I do use legal Windows.
      I tested the script with Inkscape 0.91, but it might work with other versions too.

  • lutfi says:

    i tried save as to eps, but this error showed :
    Traceback (most recent call last):
    File “aieps_output.py”, line 1043, in
    print(converter.convert())
    File “aieps_output.py”, line 1015, in convert
    self.walkElem(self.root)
    File “aieps_output.py”, line 756, in walkElem
    self.walkElem(child)
    File “aieps_output.py”, line 756, in walkElem
    self.walkElem(child)
    File “aieps_output.py”, line 735, in walkElem
    self.elemRect(elem)
    File “aieps_output.py”, line 530, in elemRect
    self.elemPath(elem, pathData)
    File “aieps_output.py”, line 416, in elemPath
    lamda = rxdd/r1x + rydd/r2y
    ZeroDivisionError: float division by zero

    what should i do?

    • Prim András says:

      That means you have an elliptical curve somewhere with zero size: I did not expect such thing. I was able to reproduce this bug by creating a circle, converting it to path and setting its width or height to zero (well, only almost zero because the line width is still counted).
      If you find this element(s) and delete it/them, or increase its/their size, then you should be able to export.
      I might create a bugfix for it, but don’t hold your breath.

  • Ananda Rizki Z.S says:

    Hi! Thanks for this great addon! is this work for Inkscape 0.92.2? i dont have illustrator, so can you test it? please report if there are some problems while the eps file opened in illustrator

    • Prim András says:

      I don’t have Illustrator either, when I wrote the script, I downloaded a 30 day trial version. I hope there are still providing such trial version which you can download for a quick check.

  • Ananda Rizki Z.S says:

    Hi! I tried on the latest version of inkscape 0.92.2, when my vector exported, it scaled down to a small vector, smaller than document size, can you make it compatible to latest version of inkscape please? i dont know where to download inkscape 0.91 or older, the official site link is broken.

  • Ananda Rizki Z.S says:

    Is the gradient work when its exported to illustrator?

  • Dmitry Zhart says:

    In Illustrator everything is 80% size now, but I read somewhere, that it’s probably because of the 72 dpi / 90 dpi difference

    I solved this problem by replacing these lines in the plugin (137-140):
    self.docWidth = self.unittouu(elem.get('width'))*0.8
    self.docHeight = self.unittouu(elem.get('height'))*0.8
    # transform svg default px to eps default pt
    self.matrices = [ [0.8, 0, 0, -0.8, 0, self.docHeight] ]

    …by these lines:
    self.docWidth = self.unittouu(elem.get('width'))
    self.docHeight = self.unittouu(elem.get('height'))
    # transform svg default px to eps default pt
    self.matrices = [ [1, 0, 0, -1, 0, self.docHeight] ]

    Now the image in Illustrator is the same size (in pixels) as in Inkscape. Is this a correct solution?

    • Prim András says:

      Yes, it is correct if your document unit is pt. For me it is mm, so it needs different numbers: I am working on a solution that handles any document unit, I need some more testing.

      However, I had to keep the 0.8 for the docWidth and docHeight. Please check again, whether the document size remains correct if you keep those two 0.8. If not, than please send me an svg so that I can find out what is the difference between your file and mine.

      Edit: I found this page that explains how units are handled in inkscape, and updated the script according to it.

  • Ian says:

    Your script doesn’t work for Inkscape version 0.92.2-

    • Prim András says:

      Oh, I realized now, that the new zip file has a subdirectory: that is not needed, copy aieps_output.inx and aieps_output.py directly into the Inkscape extensions folder.
      If that was not the problem, then pleas provide more information, because it works for me with version 0.92.2

  • Ian says:

    I have a svg-file in which there is only one object – a path with four nodes and its fill, but your script exports some blank eps-file from it.

    Link to the files mentioned: http://mysharegadget.com/369242960

    Thanks for your attention.

    • Prim András says:

      Thanks for the bug report, the minimal example file helped a lot to identify the problem.

      I made a new release with a fix for this issue.

  • Ananda says:

    the new version of inkscape 0.92.3 is out, are you updating it? is it compatible with the new version of inkscape?

    • Prim András says:

      I did not try, but minor versions should not introduce breaking changes, so it’s worth a try.

  • Dennis says:

    it work with Windows 10?

Leave a Reply

Your email address will not be published. Required fields are marked *