Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I rotate an image with ghostscript? I am visualizing eps to screen. I am using the command:

gs image.eps
share|improve this question
up vote 1 down vote accepted

try this way:

gs -dEPSCrop -c "<</Orientation 1>> setpagedevice" -f input.eps -c quit

P.S this code snippet come from this post in the rhinocerus forum.

share|improve this answer
I have never understood what is '-c quit' for – simona Jan 9 '13 at 15:00
@simona, "-c" executes a postscript command. The last "-c" option in the example executes "quit" command and ends the postscript elaboration. If you omit it, you'll obtain a ghostscript prompt waiting for a command. – andcoz Jan 11 '13 at 21:49

A bit more modern Ghostscript

Newer Ghostscript versions come with the much improved eps2write device.

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=eps2write -sOutputFile=output.eps -c "<</Orientation 3>> setpagedevice" -f input.eps

The -dSAFER option keeps thing safe, prohibiting the input Ghostscript from performing arbitrary file read/write operations.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.