# My page number is disapearing after page 1

I'm writing a document in latex with two logos in the header and a custom page number in the bottom right. The problem is that although the header is displayed correctly, the footer on the second page seems to disappear off the page.

This is the bottom-right corner of the second page and you can see a few pixels of the page numbering. The code which I am using for the header and footers is:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in, a4paper,textheight=8in]{geometry}

\usepackage[]{graphicx}
\usepackage{float}
\usepackage{subcaption}
\usepackage{amsmath}
\usepackage{caption}
\usepackage{lastpage}
\usepackage{subcaption}
\usepackage{wrapfig}
\setlength{\parindent}{0pt}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage{lipsum}
\fancypagestyle{plain}
\cfoot{}
\rfoot{\thepage\ $|$ \pageref{LastPage}}
\pagestyle{plain}

%\AtBeginDocument{\layout*}

\title{\textsc{Grasp initial findings and proposal}}
\author{\textsc{H.G. van den Boorn}}
%\date{\vspace{-5ex}}

%\thispagestyle{plain}
\begin{document}

%\vspace*{-15pt}
%{\let\newpage\relax\maketitle}
\maketitle
%\vspace*{10pt}

\lipsum

\section*{Behavioral tests}
\lipsum
\section*{Improvement of scores}
\lipsum

\end{document}


which I put before the document begins.

How can I solve this problem?

• Increase the size of the footer? ;-) – user31729 Apr 20 '16 at 22:16
• How should I change it? I can only find code to increase the header size. It seems that on the second page the page starts later (after the header which is larger than it normally is) and therefore it pushes everything downward off the page. – Héctor van den Boorn Apr 20 '16 at 22:49
• A compilable version of your document would help, reduced to the minimum that shows the feature – user31729 Apr 20 '16 at 22:50
• I just added my complete code with my text replaced by \lipsum. This produces the same problem. The two images are simply square images with a height of 2 cm – Héctor van den Boorn Apr 20 '16 at 23:10

Don't disregard warnings:

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


From the second page on, the text block is moved down by 48.50554 points, 1.7 centimeters.

You also get

Package geometry Warning: Over-specification in v'-direction.
height' (578.15999pt) is ignored.


because it doesn't make sense to specify a height and the margins.

Solution:

\usepackage[margin=1in,a4paper,headheight=61pt]{geometry}

• Thanks a lot for your response. It solved the problems with the footers but now the header is not fully visible: it shifted off the top of the pages. Increasing the headheight even further does not solve this. The logo in the header now looks like this: drive.google.com/file/d/0BwU0ksPDDgdxYmxCYTFocl9KaU0/… – Héctor van den Boorn Apr 20 '16 at 23:23
• @HéctorvandenBoorn You should set a different top margin – egreg Apr 20 '16 at 23:31
• Thank you, you are the best. You have no idea how much time I wasted fixing this myself. Now I can go to bed in peace (I live in The Netherlands) – Héctor van den Boorn Apr 20 '16 at 23:37