Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I got a Latex document which renders fine, some content is rotated using the turn environment from the rotate package. Everything works like it should.

Except: It know that it is possible to display a single page in a pdf in another orientation. The document viewer then rotates this page when viewing. This would help the readers of my document to read the turned text.

How is this possible? Perhaps somehow using the pdfpageattr command?

Again: I do not to want to rotate the content, I just want to tell the PDF-Reader that it should rotate the page when displaying.

share|improve this question
1  
You could have a look at how pdflscape does it. –  Roelof Spijker Jan 10 '12 at 19:53
    
I already tried that, but I can not read Latex Module Code so I do not understand what happens there. –  theomega Jan 10 '12 at 20:04
2  
So you want a series of regular (portrait) pages, and then a rotated (landscape) page, and then some more regular (portrait) pages, right? Is it possible to completely separate the content on the landscape page? That is, is it (say) a page-sized table or figure, or does the landscape page form part of the regular text flow, but you just want it rotated? –  Werner Jan 10 '12 at 20:29

2 Answers 2

up vote 9 down vote accepted

You can indeed use the pdfpageattr command. You can do it as follows:

\documentclass{article}
\begin{document}
  text

  \pagebreak[4]
  \global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
  text
\end{document}

This will rotate the second page by 90 degrees. It should be obvious how to get different rotations.

share|improve this answer
    
If I change the important line with the folowing: \global\pdfpageattr\expandafter{/Rotate 90}, it also work. Why? –  Azoun Jan 10 '12 at 21:03
    
then the current attributes won't be saved. Which is usually not a problem, unless you have some other attributes set already. –  Roelof Spijker Jan 11 '12 at 0:09
    
Thanks, exacttly what I was searching for. Now I'm running into other problems, but that will be another question here. –  theomega Jan 11 '12 at 13:37
1  
Could you please show how to do this for a single page, i.e. how to change it back to the default after one page. This would improve the answer very much. I would recommend to use afterpage. –  Martin Scharrer Apr 24 '12 at 10:32
1  
@MartinScharrer It's been a while and your suggestion hasn't been included in this answer. I landed on this question wanting to know how to do exactly what you describe! Would you be able to expand on your suggestion with an edit, or a separate answer? –  joran Sep 12 '12 at 18:29

The accepted answer did not work for me, since it rotated all pages in the PDF instead of a single one. I managed to get it to work using the pdflscape package instead, as suggested in this answer:

\usepackage{pdflscape}
...
\begin{landscape}
...
\end{landscape}

I needed this to display figures. Note that, when inside the landscape environment, you must use \linewidth for a figure's width, \textwidth will not work.

share|improve this answer
    
Welcome to TeX.SX! –  Claudio Fiandrino Oct 30 '13 at 13:37

Your Answer

 
discard

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.