How to covert svg to eps in ghostscript

11,995

You'll need the 'sister' application to Ghostscript, called GhostPDL. GhostPDL includes an executable named gsvg (or gsvg.exe on Windows) which can consume SVG input and output PostScript, PDF, PNG, TIFF, PPM, PBM, JPEG and some more.

You probably need to compile GhostPDL from source. Then run 2 commands:

gsvg \
  -dNOPAUSE \
  -sDEVICE=ps2write \
  -sOutputFile=my.ps \
   my.svg 

gsvg apparently doesn't support direct EPS writing. So next, run:

gs \
  -dNOPAUSE \
  -sDEVICE=epswrite \
  -sOutputFile=my.eps \
   my.ps 
Share:
11,995
John Boe
Author by

John Boe

Updated on June 09, 2022

Comments

  • John Boe
    John Boe about 2 years

    Can you please help me with a command to convert svg file to eps in ghostscript? I tried to open the svg file in Gimp but it is very big so it looks like gimp cannot open it or it take too long. I have two files which I want to convert.

    Note: I have done a conversion from png to svg to convert raster to vectors and the convertion take most of my system disk space (almost 2GB). There for is it possible to use external cache drive for the command?

  • John Boe
    John Boe over 12 years
    Thanks. I use windows. I found the ghostpdl and there are two executables: "gxps.exe handles files in the Microsoft XPS format; pcl6.exe handles files in the PCL/XL language family." What file should I use? I think if I would use gs so the gs does not know where to find the program ghostpdl . They say "These GhostPDL builds are command-line tools. You'll need to invoke them from an MS-DOS prompt. For example: gxps-871.exe tiger.xps or pcl6-871.exe frs96.pxl "
  • John Boe
    John Boe over 12 years
    Should I have gsvg in the ghostpdl? I don't. Where to got it? Is any version for Windows/CMD?
  • John Boe
    John Boe over 12 years
    I have found a way how to convert png to eps directly in autotrace, so I have my need done. Thanks
  • Kurt Pfeifle
    Kurt Pfeifle over 12 years
    @user1141649: as I said -- "you probably need to compile GhostPDL from source". On Windows, instead of gs use gswin32c.exe or gswin64c.exe
  • Stefan Steiger
    Stefan Steiger over 8 years
    gsvg has been removed from ghostpdl. You'll only find gsvg in the old sources in the SVN. See stackoverflow.com/questions/33257452/…