# Fancyhdr - How to add a footer line outside of the footer area?

I am a beginner in LaTeX, tentatively using it for industrial documents. I am trying to mimic a company form. I do not understand why in the MWE, the content of the minipage, that I would like to see underneath the header rule, on the right side, is visible in the area reserved for the header. Also, I would like the the last line "Written by: Writer's name \hfill Approved by: Approver's name" to appear at the bottom of page, immediately above the footer line, regardless of the contents of the first page. I could not find a way to do this or to understand the behavior of the minipage. Perhaps there is also a better way to show the title underneath the right half of the header rule... Added note: The "written by..." statements should appear on the font page only. As a matter of fact there would be some logic in adding this to the contents of the footer of the front page, with additional arguments in the "Document parameters" list (these parameters are located in my original code on a separate file), such as \WriterName, \ReleaseDate, \ApproverName, etc, but it should appear above the footer rule line.

\documentclass[a4paper, oneside,11pt]{article}
\usepackage[top=10mm, bottom=40mm, left=19mm, right=19mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[draft]{graphicx}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage[T1]{fontenc}
\usepackage{tgheros,textcomp}
\usepackage{lipsum}
\usepackage{lastpage}
\usepackage[ french,english,]{babel}

\def\LegalStatement{ %
\footnotesize\noindent\raggedright
\parbox[t]{.45\linewidth}{The Great Company Inc \\ MAILBOX 58670 PARIS TEXAS USA} \parbox[t]{.45\linewidth}{\copyright \thinspace \the\year~Company name The Great Company Corporation \\All international rights reserved\\ (\selectlanguage{french}Tous droits réservés)}
\medskip
\parbox[t]{\linewidth}{Ce document est sujet à modifications. Contacter Company Inc pour identifier la dernière révision et en obtenir une copie. Personnel Company name Inc: consultez la base de données "database centrale".
\selectlanguage{english}This document, managed by Company name Inc, is archived in the Central database.
A printout cannot be considered as a controlled document}
}

%ARGUMENTS FOR DOCUMENT
\def\DocumentNumber {XXXXXX}
\def\DocumentName{DOCUMENT NAME}
\def\DocumentType{Educational \\Specification}
\def\RevisionNumber{A }
\selectlanguage{english} %main language of document.
%END ARGUMENTS FOR DOCUMENT

\renewcommand{\familydefault}{\sfdefault}
%--------------------------------------------------------------------------
%HEADERS AND FOOTERS EXCEPT FRONT PAGE
\fancypagestyle{plain}{% Redefining in next lines  headers and their style.
\fancyhf{}
\rhead{\textcolor{blue}{\large\bfseries{\DocumentNumber} \\ \footnotesize{\today}  \\ Rev \quad  \RevisionNumber}}
\lfoot{\bfseries\large{Rev \RevisionNumber}}
\rfoot{\bfseries{\thepage\ of \pageref{LastPage}}}
\renewcommand{\footrulewidth}{2pt}
\renewcommand{\footskip}{2 cm} %  [distance footer-main text]
} %
% END HEADERS AND FOOTERS EXCEPT FRONT PAGE

%HEADER AND FOOTER FOR FRONT PAGE
\fancypagestyle{FrontPage}{% Redefining in next lines  headers and their style.
\fancyhf{}
\rhead{\textcolor{blue}{\large\bfseries{\DocumentNumber} \\ \footnotesize{\today}  \\ Rev \quad  \RevisionNumber - PRELIMINARY }}
\cfoot{\LegalStatement}
\rfoot{\bfseries{\thepage\ of \pageref{LastPage}}}
\renewcommand{\footrulewidth}{2pt}
\renewcommand{\footskip}{1 cm} %  [distance footer-main text]--
} %
%--END HEADERS FOOTER FRONT PAGE

%---BEGIN FRONT PAGE
\begin{document}

\thispagestyle{FrontPage}
\raggedleft
\vspace{4cm}
\begin{minipage}[c][][c]{.5\textwidth}
\centering\Large{\textcolor{blue}{\textbf{\DocumentName}}} \\
\normalsize\rule{\linewidth}{2pt}
\end{minipage}

\raggedright
\section{Scope}
\lipsum[2-4]

Written by:  Writer's name \hfill   Approved by: Approver's name
\end{document}

-
Should the "Written by, Approved by" line appear on every page? – egreg Jul 17 '12 at 21:09
The answer is "yes". I have edited my question accordingly. – Yves Jul 18 '12 at 5:18
Your answer in the comment says "yes" to every page, but your edit to the question says "on the front page only". – JLDiaz Jul 18 '12 at 10:52
Sorry I meant the first page only. – Yves Jul 18 '12 at 16:40
@egrep. I have had the idea to start the footer with the "written by" etc note, add a rule underneath, and make the thickness of the normal header rule to zero. Would an approach like this make sense? – Yves Jul 22 '12 at 15:38

If this were a 1-page document a simple \vfill would suffice before the "written by" line to ensure it ends up in the bottom. Since it may have several pages, one approach is to define a \customfooter command that includes that line and replaces the original \footrule. Also, \footrulewidth must be set to zero so you don't end up with two rules.

Regarding the minipage, its behavior is normal, the problem is that it starts with reference to a line of text - and the first line of text is right after the heading. Since \headheight was too small it was starting at that position. \headheight needs to be larger to accomodate all the content that's going in the heading. Setting it to the suggested value at compilation worked when I tried your example (with an additional \vspace{0.5cm} inside the minipage.

The following worked in my setup:

\documentclass[a4paper, oneside,11pt]{article}
\usepackage[top=10mm, bottom=40mm, left=19mm, right=19mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[draft]{graphicx}
\usepackage{fancyhdr}
\usepackage{xcolor}
\usepackage[T1]{fontenc}
\usepackage{tgheros,textcomp}
\usepackage{lipsum}
\usepackage{lastpage}
\usepackage[ french,english,]{babel}

\def\LegalStatement{ %
\footnotesize\noindent\raggedright
\parbox[t]{.45\linewidth}{The Great Company Inc \\ MAILBOX 58670 PARIS TEXAS USA} \parbox[t]{.45\linewidth}{\copyright \thinspace \the\year~Company name The Great Company Corporation \\All international rights reserved\\ (\selectlanguage{french}Tous droits réservés)}
\medskip
\parbox[t]{\linewidth}{Ce document est sujet à modifications. Contacter Company Inc pour identifier la dernière révision et en obtenir une copie. Personnel Company name Inc: consultez la base de données "database centrale".
\selectlanguage{english}This document, managed by Company name Inc, is archived in the Central database.
A printout cannot be considered as a controlled document}
}

%ARGUMENTS FOR DOCUMENT
\def\DocumentNumber {XXXXXX}
\def\DocumentName{DOCUMENT NAME}
\def\DocumentType{Educational \\Specification}
\def\RevisionNumber{A }
\selectlanguage{english} %main language of document.
%END ARGUMENTS FOR DOCUMENT

\renewcommand{\familydefault}{\sfdefault}
%--------------------------------------------------------------------------
%HEADERS AND FOOTERS EXCEPT FRONT PAGE
\fancypagestyle{plain}{% Redefining in next lines  headers and their style.
\fancyhf{}
\rhead{\textcolor{blue}{\large\bfseries{\DocumentNumber} \\ \footnotesize{\today}  \\ Rev \quad  \RevisionNumber}}
\lfoot{\bfseries\large{Rev \RevisionNumber}}
\rfoot{\bfseries{\thepage\ of \pageref{LastPage}}}
\renewcommand{\footrulewidth}{2pt}
\renewcommand{\footskip}{2 cm} %  [distance footer-main text]
} %
% END HEADERS AND FOOTERS EXCEPT FRONT PAGE

%HEADER AND FOOTER FOR FRONT PAGE
\fancypagestyle{FrontPage}{% Redefining in next lines  headers and their style.
\fancyhf{}%
\rhead{\textcolor{blue}{\large\bfseries{\DocumentNumber} \\ \footnotesize{\today}  \\ Rev \quad  \RevisionNumber - PRELIMINARY }}%
\cfoot{\customfooter}%
\rfoot{}%
\renewcommand{\footrulewidth}{0pt}%
\renewcommand{\footskip}{1 cm}%  [distance footer-main text]--
} %
%--END HEADERS FOOTER FRONT PAGE

\newcommand{\customfooter}{
\vspace{-1.2cm}
Written by:  Writer's name \hfill   Approved by: Approver's name
\rule{\textwidth}{2pt}
\bfseries{\thepage\ of \pageref{LastPage}}\hfill\LegalStatement\hfill}

%---BEGIN FRONT PAGE
\begin{document}

\thispagestyle{FrontPage}
\raggedleft
\begin{minipage}[b]{.5\textwidth}
\vspace{.5cm}
\centering\Large{\textcolor{blue}{\textbf{\DocumentName}}}
\rule{.5\textwidth}{2pt}
\end{minipage}

\raggedright
\section{Scope}

\lipsum[2-5]

\end{document}

-