TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

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.




\frametitle{Frame Title}


Compiling with xelatex also outputs the message

<use  "fig1.pdf" > [1] (./slides.aux)
** WARNING ** << /Rotate 90 >> found. (Not supported yet)
share|improve this question
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
up vote 1 down vote accepted

The best approach here is to reprocess the PDF file using GhostScript, which will rewrite it to be 'well behaved':

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

(Linux will have GhostScript installed, Mac users will probably have it as part of MacTeX but Windows users will need to download and install it.)

share|improve this answer

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.

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.