Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert Illustrator files to EPS via the command line (*nix)

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?

like image 791
Alexander Rolek Avatar asked Oct 14 '25 14:10

Alexander Rolek


1 Answers

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.

like image 122
Denilson Sá Maia Avatar answered Oct 19 '25 10:10

Denilson Sá Maia



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!