Inkscape AI compatible EPS exporter

Edit: I moved the script to GitHub, go there for full 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.

Reporting issues

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

Copyright

If you create some graphics and export it with this script, the copyright of the exported image belongs to you, your are free to do with it whatever you want.

83 Comments

  • Ananda says:

    Does this script works for inkscape 0.92.1, 0.92.2, and 0.92.3?

    • Prim András says:

      I’ve tested the latest version with inkscape 0.92.3

      • Ananda says:

        Are you using genuine version of adobe illustrator or trial version for testing your script?

        • Prim András says:

          There is only one version of Adobe Illustrator, which stops working after a while if you don’t have a license. I don’t have a license, so I tested the script during my trial period six years ago. Since then I didn’t test the output with Illustrator, but I didn’t change the output format either: only fixed bugs, mostly resulting of Inkscape using more and more features of SVG for which my script was not prepared.

          Anyway, I fixed today the bug that I had using it with Inkscape 0.92.4, as far as I see the latest release (v1.0.6) of my script is compatible with Inkscape 0.92.4. You can download it on GitHub.

    • Prim András says:

      My script saves some PostScript code that translates the AI specific methods to standard PostScript: if you open an EPS that is saved with my script, this is the part between “%%BeginProlog” and “%%EndProlog”. I wrote this while I still had the trial period of Illustrator, and tested that Illustrator and Evince displays the exported files the same. Since then I did not change this PostScript code, and I test the exported files only in Evince.

  • Thanks a lot, very big help!!!

  • Ananda says:

    Hello! are you updating the script to be compatible with the new inkscape 0.92.4? you didn’t post the update, are you still working on this script?

    • Prim András says:

      Hi. I wasn’t aware that it is not correctly working with 0.92.4. I’m going to try and fix this issue, thanks for bringing my attention to it. (I don’t actively use Inkscape for quite some time, therefore I don’t recognize compatibility issues without somebody reporting it.)

      I’ve created an issue on github for this: https://github.com/tzunghaor/inkscape-eps-export/issues/7

      • Ananda says:

        So, what inkscape version is compatible to use with this script for right now? are you upgrading it to a newer version instead of 0.92?

  • splinefx says:

    Hi. The description says: “Circles and elliptical arc segments in paths are converted to bezier curves.” But for some reason in my case ellipses just don’t export at all. Layers containing them are exported empty.
    Tried three versions (1.0.2, 1.0.3, 1.0.4) in both 0.92.4 and 1.0beta2 versions of Inkscape (for 1.0beta2 only 1.0.4 works, probably because of Python 3 support), same results.
    Is it a bug? Or I’m experiencing some intended behavior, and I should just manually convert every ellipse to a path by myself? Thanks in advance!

  • HRCD says:

    Sorry, it’s the third time I wrote this comment
    It seems like the previous comments are not posted.
    Thanks for the script!
    Unforunately, I got some issues when exporting my SVG file to EPS.
    Someone already opened an issue thread on github page. It’s the same issue I’ve encountered.
    But my system is Windows 10, Inkscape 0.92.4

    • Prim András says:

      Your messages did not appear because they need to be approved before published. I’ll work on the issue earliest the next weekend.

  • Ananda says:

    Hi! i want to ask for the older version of this script (that works with Inkscape 0.91), is the gradient arranged properly when opened in adobe illustrator or is it rasterized?

    • Prim András says:

      They shouldn’t be rasterized in AI.
      The main goal of writing this script was to have gradients that are not rasterized by AI.

  • fathur racman says:

    Hi! It’s me again, i just tried to copy the script on my linux, but i don’t find “System: User extensions”. Can you help me with this again? please. Thank you

  • fathur racman says:

    I can’t extract it on linux, it said i don’t have permissions, can you help to solve this problem?

    • Prim András says:

      Thanks for the comment, I’ve updated the description:

      copy it to the directory listed in Edit > Preferences > System: User extensions

  • Dennis says:

    it work with Windows 10?

  • 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.

  • 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.

  • 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

  • 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.

  • Ananda Rizki Z.S says:

    Is the gradient work when its exported to illustrator?

  • 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:

    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.

  • 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.

  • 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.

  • 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.

  • 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)

Leave a Reply

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