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?
3 Answers
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. Apr 22, 2013 at 21:57
-
3I agree with the request for a code snippet but not with downvote. Pdftk is a good answer to the question. Apr 22, 2013 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. :-) May 3, 2013 at 17:01 -
2@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. May 3, 2013 at 18:12
Here's the solution using the wallpaper package:
\documentclass{article}
% adjust margins to fit your letterhead
\usepackage[left=3cm,right=3cm,top=7cm,bottom=3cm]{geometry}
% embed pdf of letterhead as background image
\usepackage{wallpaper}
\ULCornerWallPaper{1}{empty-letter.pdf}
\pagestyle{empty}
\begin{document}
Your text goes here \dots
\end{document}
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. Apr 26, 2013 at 11:32
\includegraphics
from thegraphicx
package?overlay
option withtikz
to imbed the page with letterhead as a background image.\tikz[overlay, remember picture]\node[opacity=0.8](current page.center){\includegraphics[width=\paperwidth]{letterhead.pdf}};