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}
\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