I found here on tex.stackexchange.com an excellent & beautiful portrait-but-1-page-landscape-table snippet (see below).
This is exactly what I need, however I want a pagenumber, but when I comment out thispagestyle{empty}, then the pagenumber itself is not rotated. So that is still portrait.
How to get the footer/header also rotated? The rest need to stay the same (well functionally, so only impact a single page with table, \afterpage, PDF rendering, etc).
MWE:
\documentclass{article}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}% or use the larger `caption` package
\usepackage{lipsum}% dummy text
\begin{document}
\lipsum % Text before
\afterpage{%
\clearpage% Flush earlier floats (otherwise order might not be correct)
% \thispagestyle{empty}% empty page style (?)
\begin{landscape}% Landscape page
\centering % Center table
\begin{tabular}{llll}
A & B & C & D \\
\end{tabular}
\captionof{table}{Table caption}% Add 'table' caption
\end{landscape}
\clearpage% Flush page
}
\lipsum % Text after
\end{document}