# Mimicking letterhead with continuation page using tikz and fancyhdr

I'm trying to mimic a letterhead with a continuation page. The letterhead format is as follows: a colour banner on the first page, with a logo positioned on the right and a department name on the left. Also on the first page is the department address near the bottom. All of these must be positioned absolutely. The continuation page has the logo, at the same position, but nothing else.

In my ignorance, I thought I would do the absolute positioning with tikz, using page coordinates. This works for the first page, but does not seem to work for any continuation page. That is, the continuation pages should include the logo, and only the logo, but they don't include anything. So far I haven't been able to find any answer that quite addresses the question, and I'm quite sure I'm lost in silly mistakes in fancyhdr, and probably doing it the wrong way to boot.

Here's an example of the current output. The second page and all subsequent pages should have a demo image at exactly the same position as the first page.

Here's the class file

% class file MWE
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mweletter}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}

\ProcessOptions

\RequirePackage[demo]{graphicx}
\RequirePackage[left=2.5cm,showframe]{geometry}
\RequirePackage{fancyhdr}
\RequirePackage{tikz}
%\RequirePackage{fontspec}
\usetikzlibrary{calc}

\sffamily\fontsize{8}{10}\selectfont
\textcolor{blue}{\begin{minipage}{7cm}
Block A Level 4, Simpson Street, Springfield USA  \\%
Tel: (+1) 617 123 4567 \\
\end{minipage}}
}

\renewcommand{\footrulewidth}{0pt}%

\pagestyle{plain}
\AtBeginDocument{\thispagestyle{firstpage}}

\fancypagestyle{firstpage}{%
\fancyhf{}%
\begin{tikzpicture}[overlay, remember picture]
\fill [anchor=north west,inner sep=0pt,orange]
(current page.north west)  rectangle ($(current page.north east) + (0,-3cm)$);
\node[anchor=north east,inner sep=0pt] at ($(current page.north east) + (-1cm,-0.5cm)$)
{\includegraphics[height = 1.6cm]{demo}};
\node[anchor=north west,inner sep=0pt] at
($(current page.north west) + (2.5cm,-0.5cm)$) {
\sffamily\fontsize{8}{12} Department
of Excellent Science };
\node[anchor=south west, inner sep=0pt] at
($(current page.south west) + (2.5cm,1.5cm)$) {\usebox{\addressbox}};
\end{tikzpicture}
}

\fancypagestyle{plain}{%
\fancyhf{}%
\begin{tikzpicture}[overlay, remember picture]
\node[anchor=north east,inner sep=0pt]
at ($(current page.north east) + (-1cm,-0.5cm)$)
{\includegraphics[height = 1.6cm]{demo}};
\end{tikzpicture}
}


And a latex file to run through it.

\documentclass[12pt]{mweletter}
\usepackage{blindtext}
\signature{%
Johnathan "John" I.Q. Neidelbaum Frink, Jr., B.Sc., Ph.D. M.R.S.C. \\
The Principal Professor \\
Springfield Heights Institute of Technology \\
Springfield, America
}
\date{\today}
\begin{document}
\begin{letter}{Prof Tan\\
Beijing Da Xue}
\opening{Dear Prof Tan,}
\Blindtext[5]
\closing{Yours sincerely,}
\encl{mweletter.cls}
\cc{Lisa Simpson}
\end{letter}
\end{document}

• I don't know what all these macros do. However if you just want to always have the picture at this position, you may use eso-pic. That way you will not depend on the mercy of \fancypagestyle{plain}{. – marmot Feb 11 '18 at 4:23
• All your headers and footers are empty. – cfr Feb 11 '18 at 4:52
• @marmot, now I realise how pointless it was to use fancyhdr, and have a working solution that uses eso-pic, which I wasn't aware of. Not sure whether to delete the question, or whether the answer might be helpful for others. – GTK Feb 11 '18 at 5:02
• @CarLaTeX, OK, done. – GTK Feb 11 '18 at 10:02

marmot's comment made me realise how silly it was to use fancyhdr in the first place. I was completely unaware of eso-pic. This simply places the elements on the pages, and treats the first page differently.

% mweletter.cls
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{mweletter}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{letter}}
\ProcessOptions
\RequirePackage[demo]{graphicx}
\RequirePackage[left=2.5cm,showframe]{geometry}
\RequirePackage{tikz}
\RequirePackage{eso-pic}
\usetikzlibrary{calc}

\begin{tikzpicture}[overlay, remember picture]
\ifnum\value{page}=1
\fill [anchor=north west,inner sep=0pt,orange]
(current page.north west)  rectangle ($(current page.north east) + (0,-3cm)$);
\node[anchor=north west,inner sep=0pt] at
($(current page.north west) + (2.5cm,-0.5cm)$) {
\sffamily\fontsize{8}{12} Department
of Excellent Science };
\node[anchor=south west, inner sep=0pt] at
($(current page.south west) + (2.5cm,1.5cm)$) {
\sffamily\fontsize{8}{10}\selectfont
\textcolor{blue}{
\begin{minipage}{7cm}
Block A Level 4, Simpson Street, Springfield USA  \\%
Tel: (+1) 617 123 4567 \\
\end{minipage}}};
\fi
\node[anchor=north east,inner sep=0pt] at ($(current page.north east) + (-1cm,-0.5cm)$)
{\includegraphics[height = 1.6cm]{demo}};
\end{tikzpicture}
}


And here's the input

\documentclass[12pt]{mweletter}
\usepackage{blindtext}
\signature{%
Johnathan "John" I.Q. Neidelbaum Frink, Jr., B.Sc., Ph.D. M.R.S.C. \\
The Principal Professor \\
Springfield Heights Institute of Technology \\
Springfield, America
}
\date{\today}
\begin{document}
\begin{letter}{Prof Tan\\
Beijing Da Xue}
\opening{Dear Prof Tan,}
\Blindtext[4]
\closing{Yours sincerely,}
\encl{mweletter.cls}