35

Recently I found out that I can't use Adobe Acrobat to rotate a multi-page pdf file by .70 degrees. So I have a regular PDF file (flat scan - no text) that I need to rotate.

But I've seen a hint that you can do it with LaTeX.

The example there isn't enough - it only does one page.

Can I do this with LaTex?

bgmCoder
  • 839

3 Answers3

57

You can use pdfpages:

\documentclass{article}
\usepackage{pdfpages}

\begin{document}
  \includepdf[pages={-},angle=30]{main}
\end{document}

rotated pdf

cfr
  • 198,882
  • 3
    PERFECT! That is so easy! You know, you can't even buy pdf software that will do this. Thanks for answering! – bgmCoder Mar 17 '15 at 02:24
  • 3
    @BGM It's actually the same solution as the answer you linked to. pdfpages passes any keys it doesn't know off to the \includegraphics command by default. It can do other things, too, but here it is basically just being used as a wrapper for \includegraphics. (I used 30 degrees because I didn't think 0.70 degrees would show up very well in the screenshot ;).) – cfr Mar 17 '15 at 02:31
  • 1
    That's so awesome! I spent hours already trying to rotate that pdf! The more I get into LaTeX the happier I become. Thanks again, cfr. – bgmCoder Mar 17 '15 at 02:33
  • 1
    @BGM There is ''Adobe InDesign'', but that requires: making a new document of the required size, placing the PDF at 100% size to fit the document (corner to corner), anchoring your adjustments to the center, rotating, and exporting (which includes PDF compatibility and the other fun publication-level stuff). But I could also simplify to: make document of required size, place PDF, rotate around center, export. But if you mean a piece of software ''dedicated'' to rotating a PDF, I doubt you'll find one. – Cole Tobin Mar 17 '15 at 03:41
  • 1
    @ColeJohnson Sounds very complicated ;). – cfr Mar 17 '15 at 12:56
  • If you just want to rotate a pdf, you can also use the pdfjam wrapper: pdfjam --outfile rotated.pdf --angle 30 -- input.pdf. – Martin - マーチン Nov 04 '19 at 12:48
  • @Martin-マーチン Yes ... but the point is you can rotate while including it, isn't it? – cfr Nov 04 '19 at 21:31
  • I might have misunderstood the question; I came from a non-LaTeX query to this question. Sorry about that. – Martin - マーチン Nov 05 '19 at 00:35
  • @Martin-マーチン No problem. pdfjam is useful (although I'm still using pdftk which is even better, though deprecated). – cfr Nov 05 '19 at 04:18
0

I used the following to rotate a .pdf file of one page.

\begin{figure}[h!]
 \centering
  \includegraphics[width=7.5cm, angle=-90]{graph.pdf}
\end{figure}
-10

If you save the pdf as an image (jpg) and use Microsoft Word you can rotate.