Edit:
\documentclass{article}
\usepackage{blindtext}
\usepackage{rotating}
\usepackage{caption}
\usepackage{tikz}
\begin{document}
\blindtext\par
\pagebreak
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
\thispagestyle{empty}
\begin{tikzpicture}
\node[rotate=90] at (0,0) {\begin{minipage}{\textheight}
\begin{center}
I'd like to rotate this page
\end{center}
\blindtext
\centering
\includegraphics[width=0.3\textwidth]{example-image-a}
\captionof{figure}{Test caption}
\end{minipage}};
\end{tikzpicture}
\pagebreak
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
\Blindtext
\end{document}
From the answer here: https://tex.stackexchange.com/a/40692/120578
\documentclass{article}
\begin{document}
text
\pagebreak[4]
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 90}
text
\pagebreak
\global\pdfpageattr\expandafter{\the\pdfpageattr/Rotate 0}
text
\end{document}
I didn't want to change the original answer, so I wrote this here as an answer to a duplicate question (I am going to flag it but I will reffer to it in the comments in the original answer).
sidewaysfigure/table
will rotate the page where the figure will be placed, while the answers in the other thread create a rotated page where to place the content. Moreover,sideways
will rotate differentlytwoside
documents; the other thread does not cover it. To fully answer this, you need to combine this to patch the rotation, this or this to avoid interrupting the text (withafterpage
).