I am having problems getting the tikzpagenodes package to work with the pdflscape package. I want to access the nodes (current page text area) and (current page marginpar area) when rotating a page to landscape, but I am surprised by the results.
My problem is somewhat similar to the one in this post, though for me the (current page) node works as expected.
Here is an MWE where I try to draw the outline of the node, both before and after starting the rotation. I am compiling this with pdflatex and also with lualatex in MiKTeX 2.9 (I actually probably need to use lualatex for memory reasons).
\documentclass{article}
\usepackage{pdflscape}
\usepackage{tikzpagenodes}
\usepackage{fancyhdr}
\usepackage{blindtext}
\fancypagestyle{sideways}{
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{}
\fancyhead{\tikz [remember picture,overlay] \draw [red] (current page text area.south west) rectangle (current page text area.north east);}
}
\begin{document}
\begin{landscape}
\thispagestyle{sideways}
\blindtext
\end{landscape}
\clearpage
\thispagestyle{sideways}
\begin{landscape}
\blindtext
\end{landscape}
\end{document}
The output I am seeing is that the text is correctly placed, while the tikz node is much too small:

The reason I am putting the \tikz\draw inside a fancyheading is that I want to use this for placing headers and footers on a landscape page (yes, I know I probably shouldn't...).
I have also observed the 'inverse' of this behaviour, where the (current page text area) is placed correctly, and the text is occupying the region now outlined by the (current page text area) node, but I was not able to reproduce this behaviour in a reasonably small MWE.

\includegraphics[height=\textheight]{whatever.png}within a landscape environment. Something like! Output loop---100 consecutive dead cycles.While\includegraphics[width=\textwidth]{whatever.png}will continue to work. Perhaps there is a way to correct this. Note it seems parameterheightis the culprit here-being disabled. – Jonathan Komar Mar 22 '16 at 12:56