Reputation: 973
I'm trying to do batch conversion of AI files to EPS files via the command line on Linux. I'm familiar with using Ghostscript for various EPS and Postscript related tasks. I have been semi successful using the Ghostscript epswrite device, but my understanding is this device is deprecated.
What is the best way to convert Adobe Illustrator files to EPS files via the command line in a *nix environment?
Upvotes: 4
Views: 8034
Reputation: 49487
For anyone arriving at this question from a search, here is an answer:
gs -dNOPAUSE -dBATCH -sDEVICE=eps2write -sOutputFile=out.eps input.ai
gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf input.ai
Look at the documentation for a list of possible outputs.
My answer here is based on (and is almost a copy-and-paste of) this answer from askubuntu.
Footnote: I had an .ai
file that Inkscape was having trouble opening (wrong colors or layers or something else). Fortunately, I managed to use ghostscript to convert the .ai
file into .eps
and .pdf
, and then Inkscape had no trouble opening these converted versions.
Upvotes: 7
Reputation: 31199
epswrite isn't (yet) deprecated, but it will be when we finish a version of ps2write which will produce EPS files.
Note that .ai files are not strictly speaking PostScript and therefore are not guaranteed to be suitable for use as input to Ghostscript.
So even using epswrite, there's no guarantee that you can take a .ai file and get a .eps using Ghostscript.
Upvotes: 1