# Rotated table overlapping with page header

I have a problem similar to:

Problem between Sidewaystable and page header

I want to insert some blank space above the vbox such that the table isn't overlapping with the page header.

Due to GDPR I can't share my table but It's on the below form:

\documentclass[12pt]{article}
\usepackage{float}
\usepackage{rotating}

\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}

\fancypagestyle{documentstyle}{
\fancyhf{} % clear all header and footer fields
\cfoot{\thepage\ of \pageref{LastPage}}
}

\begin{document}

\newpage\pagestyle{documentstyle}

\setlength{\tabcolsep}{0.1cm}
\rotatebox{90}{
\vbox{
\begin{table}[H]
\centering
\tiny
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1&1\\ \hline
1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1&1\\ \hline
\end{tabular}
\end{table}
}}

\end{document}

• Your code produces an error on my machine. – user194703 Apr 24 '20 at 22:25
• Anyway, you should never use adjustbox for tables, as it leads to fontsize inconsistencies. – Bernard Apr 24 '20 at 22:33
• @Schrödinger'scat, I updated the latex part, and it should work now. – User123456789 Apr 25 '20 at 11:13
• @Bernard Thank you for your comment, I was wondering, why it changed the size of the text when adjustbox was added. I use adjustbox to move the caption relative to the table, my table is so large that the difference between \tiny when using adjustbox and not using adjustbox is so small that I prefer using adjustbox in this case. – User123456789 Apr 25 '20 at 11:21
• You have several better solutions, but it's impossible to propose whatever without a representative example. Among the solutions, if there are many columns, reducing the value of tabcolsep (6pt by default, and there are two of them between two adjacent columns), using multilined cells and of course, reducing the font size (in my opinion, under \footnotesize, it gets unreadable – and very likely unread. – Bernard Apr 25 '20 at 11:36

I would use sidewaystable. The table will be in the center of the text area as long as it is smaller than it:

\documentclass[12pt]{article}
\usepackage{rotating}

\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}

\fancypagestyle{documentstyle}{
\fancyhf{} % clear all header and footer fields
\cfoot{\thepage\ of \pageref{LastPage}}
}

\begin{document}
\pagestyle{documentstyle}

\begin{sidewaystable}
\centering
\begin{tabular}{|c|c| c|c| c|c| c|c| c|c| c|c| c|c| c|}
\hline
1& 2& 3& 4& 5& 6& 7& 8& 9& 10& 11& 12& 13& 14& 15\\ \hline
1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1&1\\ \hline
\end{tabular}
\end{sidewaystable}

\end{document}