2

When I include an image in pdf format, the image in the file is normal when compiling with pdfLaTeX, but it is rotated counterclockwise 90 degree when using XeLaTeX. The questions are:

  1. Why?
  2. How to avoid this? I don't mean using the option of angle=-90 of the command \includegraphics.
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{impact1}
\end{document}

impact1

  • 1
    Please add a minimal working example (MWE) that starts with \documentclass{...} and ends with \end{document} that produces this behavior. Also, include a link to a pdf image, if that behavior depends on the image you use. Finally, let us know if you're using any special options or the like when you're compiling. – doncherry Oct 30 '12 at 4:31
  • 1
    Thanks! I can't reproduce the error, but that might be because the image was converted to png when you uploaded it. Do you get the error with the png file? If not, please upload the original pdf image to a file hoster of your choice (Stack Exchange doesn't provide an option for that). The only issue with the png image is that it's way too wide, but add \includegraphics[width=\linewidth]{impact1} solves that problem. (As for using tex.sx: Check out mark text as a code sample and mark inline code.) – doncherry Oct 30 '12 at 5:09
4

Some softwares produce PDF images including Rotate PDF primitive. But XeTeX doesn't support Rotate PDF primitive now. That's the prolem.

Solution: Just do some preprocessing. e.g.

pdfcrop foo.pdf foo-new.pdf

and include the foo-new.pdf.

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.