[Tex/LaTex] How to add a background to every page except the first

backgroundswatermarkxetex

I want to make a company letterhead in LaTeX (example output here), and I did it using fancyhdr and absolute positioning, which, while horrible, worked fine so far.

I must have updated XeLaTeX, because now every page after the second is broken. It used to give me warnings about badboxes, but everything worked fine. I think the badboxes were because the "background" image was really in the foreground, and the text was just forcefully positioned over it.

What I want to do is:

  1. Create a title page with \maketitle that doesn't include a background image.
  2. Include a background image on every other page.
  3. Create a "back cover" page (using \makeback) that doesn't include the background image.

I tried the wallpaper package, but it can only set a wallpaper on every page. I tried the xwatermark package, but it complains about something called undefined name grey!55, which I have no idea about. How can I accomplish what I need?

Best Answer

If you start your document with the title on page 1, the following is enough:

\documentclass{article}
\usepackage{graphicx}
\usepackage{eso-pic}
\usepackage{ifthen}

\title{foobar}
\usepackage{lipsum}
\begin{document}
\maketitle
\AddToShipoutPictureBG{\ifthenelse{\isodd{\value{page}}}{}{\includegraphics{backgroundimage.pdf}}}
\lipsum[1-30]
\end{document}

I don't know about the \makeback macro, so I can't tell you anything about that.