# fancyhdr - anomalous behaviour on first page

I am having trouble typesetting multi-line headers using fancyhdr The header on the first page behaves differently than the header on subsequent pages. The first page header has no depth, but produces a greater vertical displacement on subsequent pages.

Here is a sample tex file to illustrate the difficulty

\documentclass{article}

\usepackage{fancyhdr}

\chead{line 1\\line 2\\line 3\\line 4\\line 5\\line 6\\line 7\\line 8}

\cfoot{footer}

\fancypagestyle{plain}{}

\pagestyle{fancy}

\begin{document}
\thispagestyle{fancy}
page 1 \newpage
page 2 \newpage
page 3

\end{document}

-

You get a warning when you compile your MWE:

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 94.54448pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.


Adding \setlength{\headheight}{96pt} fixes the problem.

-
For an automatic solution, see Heiko Oberdiek's answer to a related question. – mforbes Jun 29 '13 at 3:09

And the log-file is telling you

Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 94.54448pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.

-