I am writing a short note. I would like to include a graphics file with a logo in the header of all pages including the front page. The logo is roughly the size of the box generated in the example below.

I am trying to use the fancyhdr package. There are (at least) two problems:

1. Too little space between the logo and the title on the front page
2. The page margin at the bottom of page 2 and subsequent pages is too small and moreover different from the bottom margin of the front page.

I realize that something has to give. Any suggestions? If I can use/tweak my headings as an alternative that would be fine too.

\documentclass[11pt,a4paper]{article}

\usepackage{lipsum}
\usepackage{graphicx}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\footrulewidth}{0pt}

\begin{document}
\title{Title here}
\date{November 2011}
\author{Jesper Jensen}
\maketitle

\thispagestyle{fancy}
\lipsum[1-9]
\end{document}

-

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


To correct \headheight, add the following line to the preamble:

\setlength\headheight{74.1pt}


Another option would be to use the background package to add the image at the desired position:

\documentclass[11pt,a4paper]{article}
\usepackage{background}
\usepackage{graphicx}
\usepackage{lipsum}

\SetBgContents{\rule{360pt}{70pt}}% \includegraphics would be here
\SetBgAngle{0}
\SetBgPosition{current page.north}
\SetBgOpacity{1}
\SetBgScale{1}
\SetBgColor{black}
\SetBgVshift{-2.5cm}

\title{Title here}
\date{November 2011}
\author{Jesper Jensen}

\begin{document}
\maketitle

\lipsum*[1-9]
\end{document}

-

You've to add the necessary height to \headheight: fancyhdr suggests to make it 74.08003pt, that is, 62.1 more than the default of 12pt.

However, this would push too low the text block, so we have to reduce the text height. The baseline skip at 11pt size is 13.6pt, and the nearest integer multiple to 62 of it is 68:

\setlength{\headheight}{75pt}    % round to the point


You might consider also reducing the top margin, say

\setlength{\headheight}{75pt}    % round to the point


so as to avoid shortening the text height too much. It mostly depends on your top page logo.

-
I'm trying to figure out what \addtolength{\textheight}{} should be when I have \setlength\headheight{42.5pt} and a font size of 12pt. Am I right in using \addtolength{\textheight}{-29pt}? (I think that -29pt is equal to -2\baselineskip.) –  Svend Tveskæg Nov 6 '13 at 3:54
@SvendTveskæg Yes, at 12pt the baselineskip is 14.5pt; but \headheight depends on the material you want to put in the header. Let fancyhdr make the computation: just look at the warning message and act consequently. –  egreg Nov 6 '13 at 7:33

Beside adjusting the headheight, you can also set the height and depth of the graphics to zero with the option arguments of \raisebox and – if you want – raise the graphics with the mandatory argument.

\chead{\raisebox{0pt}[0pt][0pt]{\rule{360pt}{70pt}}}
%               ^^^ change to raise.

-