# XeLaTeX rotating my figures in Beamer

Whenever I compile my beamer presentations with xelatex, it forces any .pdf figures I've included with \includegraphics to rotate 90 degrees. If I compile with pdflatex or lualatex, I do not have this problem. Has anyone else seen this issue and/or know how to fix this?

For example, if I compile the following .tex code with lualtex, the sizing and positioning of fig1.pdf is as I expect. If I compile with xelatex, the figure is rotated by 90 degrees.

\documentclass{beamer}

\usepackage{fontspec}
\setsansfont[Ligatures=TeX]{GillSansMT}

\begin{document}

\begin{frame}
\frametitle{Frame Title}
\includegraphics[width=0.5\textwidth]{fig1.pdf}
\end{frame}

\end{document}


Compiling with xelatex also outputs the message

<use  "fig1.pdf" > [1] (./slides.aux)
** WARNING ** << /Rotate 90 >> found. (Not supported yet)
)

-
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. –  Marco Daniel Aug 9 '12 at 21:16
It may be worth mentioning that fig1.pdf was created using CERN's ROOT data-analysis software. –  xvtk Aug 9 '12 at 21:49
I have a feeling I've seen this before, and that it's to do with the image files. Could you link to a suitable demo image? –  Joseph Wright Aug 9 '12 at 21:51
I'm afraid I can't find a ROOT-produced .pdf file to link to at the moment. I'm remembering that ROOT used to create rotated pdfs by default. I guess they threw in the /Rotate 90 command into the .pdf code as a quick fix, and xelatex (and some versions of PowerPoint) doesn't know what to do with it. –  xvtk Aug 9 '12 at 22:12

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=

I did manage to find a work-around for this. If I convert my .pdf image to .ps using pdf2ps and then convert it back to .pdf with ps2pdf, the figure is properly oriented when compiled with xelatex.