1

I want to rotate page with large figure in pdf viewer and it works only in xetex.

I found many similar questions and tried answers here but no one works as expected for me. There happen unwanted page breaks, to much pages are rotated, wrong page is rotated, page is converted to landscape, etc...

So how?

\documentclass{article}
\usepackage{ifxetex}
\usepackage{blindtext}
\usepackage[figuresleft]{rotating}
\usepackage{graphicx}

\begin{document}
\Blindtext END ONE

\Blindtext END TWO

\begin{figure}
\ifxetex
    % this works with xetex
    \special{pdf: put @thispage <</Rotate 90>>}%
\else
    % so how to rotate page for luatex, pdftex, etc...? 
    This page should be rotated.
\fi
\begin{sideways}
\resizebox{!}{\textwidth}{\includegraphics{example-image-a}}
\end{sideways}
\caption{Example}
\end{figure}

\Blindtext END THREE

\Blindtext END FOUR

\end{document}
Simon
  • 351
  • \pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90} or Rotate 270 depended if doublesided and the orientation you wish to have. – koleygr Feb 18 '19 at 14:03
  • See the pdflscape package. – John Kormylo Feb 18 '19 at 16:45
  • See https://tex.stackexchange.com/questions/471472/how-to-make-figures-appear-landscape-properly/472608#472608. – Ulrike Fischer Feb 18 '19 at 18:28
  • Solution from above link works and that's great. But does it have to be so complicated in comparison to single line command with xetex? Any way to simplify it? – Simon Feb 18 '19 at 20:01

0 Answers0