# Creating letters with zero-margin colored headers, in addition to the regular letterhead

I'm trying to use LaTeX for creating corporate letters. What I have found is that there are many tools to write letters, but they are mostly focused on letters of more personal nature rather than corporate letters, in the sense that I can not find many ways to configure colored styles that are more common in corporate letters. What do I refer to? Something like this (taken from this site):

This letter consists of two 'headers':

• The orange header with the logo and some text (part of the corporate style)
• The contact / meta info of the letter (organization contact details, reference, etc).

In most examples and documentation (eg the this wiki entry), it is explained how to set up textual letterhead, but not the header that forms part of the corporate style. So my question is: what is the proper way to do this? I have found similar information, for instance here:

But the problem is that they are not letter documents, and I feel these solutions are not the correct way to do this. Also, in a letter this header part is logically repeated on every page, and that is not the case in the samples either. I am also considering using the background package for this top header (the orange part), but I am not sure if this is correct either.

What is the right way to set this up?

-

## 2 Answers

I am using a hack in a similar situation: I have designed an A4-sized PDF that contains all the static information like colored boxes, logos and so on. This is placed into the background of a page. The letter proper is typeset on top of that using the dinbrief class that is geared towards letters in German.

\documentclass[11pt]{dinbrief}
\usepackage[utf8]{inputenc}
\usepackage{graphics}

\address{}
\centeraddress
\textwidth12cm

\setaddresswidth{75mm}
\setaddressheight{40mm}
\setaddressllcorner{25mm}{90mm}
\setbottomtexttop{270mm}  % x from top of page
\bottomtext{\kern27mm%    % y from bottom of page; x+y=297mm
\vbox to 0pt{\vss\hbox to 0pt{\kern-2.5cm
\includegraphics{letterheads/head-lzi-cl.pdf}\hss}}}

\signature{Christian Lindig}
\place{Saarbrücken}
\nowindowrules

\begin{document}
\begin{letter}
{Prof. Drov Nuts\\
St. Anford\\
USA}

\subject{Ut enim ad minim veniam, quis nostrud exercitation}

\opening{Sehr geehrter Herr Prof. Drov Nuts,}

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\closing{Mit freundlichem Gruß}

\end{letter}
\end{document}


The crucial bits are \bottomtext where the PDF is included, put in the background and shifted such that it is properly aligned. The obvious advantage is that I can design the background PDF with any program I like and don't have to re-create the design in LaTeX.

-
Thanks, I ended up using a background for the file, using the "wallpaper" package and the command ULCornerWallPaper{1}{background.pdf} which worked as a charm. – user Feb 22 '12 at 4:01

You can do this with fancyhdr. I had to include a random 1.5ex space to get things "right."

\documentclass{letter}
\usepackage[demo]{graphicx}% The demo option creates a black box instead of a figure
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{calc}
\usepackage{color}

\usepackage{lipsum}% The lipsum package provides dummy text

\fancypagestyle{firstpage}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
\fancyhf{}%
\fancyhead[L]{\colorbox{red}{\parbox[b][\headheight-\baselineskip]{\headwidth}{\vfil{}some text\\some more text\vfil}}}%
\fancyhead[R]{\vfil\includegraphics[height = 1cm]{MyLogo.pdf}\hspace*{1.5ex}\vfil}%
}%
\fancypagestyle{empty}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
\fancyhf{}%
\fancyhead[L]{\colorbox{red}{\parbox[b][\headheight-\baselineskip]{\headwidth}{\vfil{}some text\\some more text\vfil}}}%
\fancyhead[R]{\vfil\includegraphics[height = 1cm]{MyLogo.pdf}\hspace*{1.5ex}\vfil}%
}%
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
\fancyhf{}%
\fancyhead[L]{\colorbox{red}{\parbox[b][\headheight-\baselineskip]{\headwidth}{\vfil{}some alt text\\some more alt text\vfil}}}%
\fancyhead[R]{\vfil\includegraphics[height = 1cm]{MyLogo.pdf}\vfil}%
}

\setlength{\fboxsep}{0pt}
\geometry{top = 4cm, headheight = 4cm}
\fancyhfoffset[L]{\oddsidemargin + \hoffset + 1in}
\fancyhfoffset[R]{\evensidemargin + \marginparwidth - \marginparsep}

\name{My Name}
\address{My University\\My Road\\My City}
\telephone{(555) 555-5555}
\signature{My Nickname}
\pagestyle{plain}
\begin{document}%
\begin{letter}{%
Some Name\\%
Some Department\\%
Some University\\%
Some Road\\%
Some City%
}%
\opening{Dear \toname{},}\hfil

In this 1+ page letter the header and footer on the first page are different from the other pages. If the address macro is used the first page style is empty'' otherwise it is firstpage''

\lipsum[1-8]
\closing{Sincerely,}
\end{letter}%
\end{document}%


-