epstopdf rotating issue

Another post more for my own benefit and future reference.

epstopdf often rotates figures that you'd prefer it didn't. That's ghostscript getting a bit eager. The following kludge will fix it:

export GS_OPTIONS=-dAutoRotatePages=/None

before running epstopdf as usual.


export GS_OPTIONS="-dPDFSETTINGS=/prepress -dAutoRotatePages=/None"
to embed fonts as well...


光光 said...
This comment has been removed by a blog administrator.
j_random_hacker said...

In my experience, the root cause of this rotation is actually the program that created the original EPS file inserting a "%%Orientation: Landscape" line into the EPS header. I've found that R's postscript() device "helpfully" does this automatically if the figure is wider than it is tall and you don't specify horizontal=F, and I suspect gnuplot does something similar based on the example EPS file attached to this Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/texlive-bin/+bug/294809.

OTOH there does seem to have been a genuine auto-rotation bug in the more distant past: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=131570. But this seems to have been fixed.