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)
  • 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

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.)


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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