# Output TeX into a PDF template

I'm writing a cover letter that I want to have on university letterhead, which I have a full-sized electronic copy of (in PDF as well as JPG). Is there an easy way to make TeX do this?

-
\includegraphics from the graphicx package? – cmhughes Jan 10 '13 at 21:31
If the letterhead is a full sized page you could use the overlay option with tikz to imbed the page with letterhead as a background image. – Peter Grill Jan 11 '13 at 8:19
I recently used the wallpaper package for this job. – Alex Jan 13 '13 at 13:12
\tikz[overlay, remember picture]\node[opacity=0.8](current page.center){\includegraphics[width=\paperwidth]{letterhead.pdf}}; – Daniel Apr 23 '13 at 5:43
@Daniel: your comment is worth converting to an answer. – Matthew Leingang Apr 23 '13 at 9:08

I recommended to use pdftk for such things. If template.pdf is the cover letter and mydocument.pdf is the (may be LaTeX generated) own document, you can can "stamp" it with the template:

pdftk mydocument.pdf background cover.pdf output mydocumentwithcover.pdf

background is transparent "stamping", but stamp is a foreground stamping. If you want to stamp only the first page, create the template.pdf with an additinal empty page and use multistamp/multibackground instead of stamp/background in pdftk.

-
... Care to explain how one would use pdftk for this? Besides, the OP specifically wants a TeX way to do it. – Sean Allred Apr 22 '13 at 21:57
I agree with the request for a code snippet but not with downvote. Pdftk is a good answer to the question. – Matthew Leingang Apr 22 '13 at 22:28
@MatthewLeingang Besides the fact that voting is anonymous, pdftk seems to be a great answer to many questions, but without any real explanation per execution. I'm glad to see a real use case, however. :-) – Sean Allred May 3 '13 at 17:01
@SeanAllred: I think we agree. pdftk is a good basis for an answer and at the time of your comment the answer was incomplete. Personally, I would not downvote for that (and I'm not saying that you downvoted or that if you did it was for that reason); I would just withhold my upvote until the answer was improved. I see that whoever did downvote has rescinded it, which seems fair. – Matthew Leingang May 3 '13 at 18:12

The comments have already mentioned a number of specialized packages for this, including eso-pic and wallpaper. However, an image that shall be put behind the text usually has to be dimmed somewhat, so that the text is still readable. For this reason, I would use TikZ, which offers you an easy way to alter the opacity of the included material by its opacity= option:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{lipsum} % only needed for example text, can be removed in real application

\AtBeginDocument{%
\tikz[overlay,remember picture]\node[opacity=0.5, anchor=center] at (current page){\includegraphics[width=\paperwidth]{example-image}};%
}

\begin{document}

\lipsum

\end{document}

-
OP is asking about text on letterhead, which wouldn't normally need to be dimmed. But this is a good solution for simulating watermarked paper. – Matthew Leingang Apr 26 '13 at 11:32

Here's the solution using the wallpaper package:

\documentclass{article}