# problem with image rotation

I am facing a weird problem. I am trying to include an eps file into my thesis. The code I am using is as follows:

 \documentclass[11pt,twoside]{ce}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{color}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{float}
\usepackage{url}
\begin{document}

\newpage

\begin{figure}[H]
\includegraphics[angle=45,width=0.75\textwidth]{images/final.eps}
\caption{Final image}
\label{fig:final}
\end{figure} %working code, page does not rotate. just image rotates.

\end{document}


This code works. But when I rotate the image with 90 deg., the image rotates but the page also rotates. If I rotate it by an angle less than or equal to 45, then the page does not rotate and only the image rotates. When the rotation is greater than 45, the page and image both rotate.

 \begin{figure}[H]
\includegraphics[angle=46,width=0.75\textwidth]{images/final.eps}
\caption{Final image}
\label{fig:final}
\end{figure} % non-working code, image as well as page rotates.

\begin{figure}[H]
\includegraphics[angle=90,width=0.75\textwidth]{images/final.eps}
\caption{Final image}
\label{fig:final}
\end{figure} % non-working code, image as well as page rotates.


I want to rotate the image by 90 deg but not the page. Since each page has a header, page rotation is annoying me. Due to rotation of the page, the header comes to the right side, instead of being on the top. Can somebody help?

-
sure, i have edited the question. –  maths-help-seeker Jul 28 '12 at 21:59
Can you make the eps file available for download? –  Ian Thompson Jul 28 '12 at 22:01
ce is a template done by my faculty. I think it is a custom template. –  maths-help-seeker Jul 28 '12 at 22:02

Probably you are using Ghostscript/ps2pdf. It has the feature that it inspects the page to determine in which orientation the page if viewed best. This can be turned off:

ps2pdf -dAutoRotatePages=/None


(In the command shell of Windows you might need # instead of =).

Edit: Value fixed (thanks Higgs Boson).

-
-dAutoRotatePages#/None or -dAutoRotatePages#false? I used the former and it works. –  Donut E. Knot Jul 28 '12 at 22:28
Bingo! it worked! Thank you all for your help!! –  maths-help-seeker Jul 28 '12 at 22:48
Another method by invoking ghostscript directly: run gswin**c -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -dPDFSETTINGS=/prepress -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=output.pdf input.ps where ** is either 32 or 64 depending which one you have installed. No need to change = to # for sure. –  Donut E. Knot Jul 29 '12 at 16:43