Insert graphics/figures as watermark

4,170 views
Skip to first unread message

BDW

unread,
Oct 25, 2011, 8:00:35 AM10/25/11
to LaTeX Users Group
Can anyone help me to add a figure (pdf/jpg/png) file as a watermark?
It also needs to be shaded (like 50% transparent) and preferably
automatic converted to grey-scale when it is a colour-file. One
package can only add a text as watermark (shaded), the other one can
add a figure, but without transparency/shading. I already used google
a zillion times without help.

I currently use the following code:

\newcommand\BackgroundLogo{
\put(0,0){
\parbox[b][\paperheight]{\paperwidth}{%
\flushright
\includegraphics[width=0.25\paperwidth, keepaspectratio]
{page_logo.jpg}%
\textcolor{white}{MMM}
\vfill }}}
which adds a figure in the topright corner (without shading). The
triple M is added to preserve some distance between the figure and the
border of the paper.


BDW

Peter Flynn

unread,
Oct 25, 2011, 9:08:42 AM10/25/11
to latexus...@googlegroups.com
On Tue, Oct 25, 2011 at 1:00 PM, BDW <boudewijn....@gmail.com> wrote:
Can anyone help me to add a figure (pdf/jpg/png) file as a watermark?
It also needs to be shaded (like 50% transparent) and preferably
automatic converted to grey-scale when it is a colour-file. One
package can only add a text as watermark (shaded), the other one can
add a figure, but without transparency/shading.

\documentclass{article}
\usepackage{graphicx,eso-pic,lipsum}
\AddToShipoutPicture{%
  \put(0,0){\includegraphics[height=297mm,width=210mm]{peter.jpg}}}
\begin{document}
\lipsum[1]
\lipsum[2]
\lipsum[3]
\end{document}

Just make sure that the image is proportioned correctly for the paper size, and that the image is monochromed and gray-scaled appropriately (LaTeX cannot do this: you must use a graphics package like GIMP to do that first).
 
I already used google a zillion times without help.

Google for latex watermark image, look at the first hit, and go to the section "UPDATE: Neno wants to know how to use a picture instead of text." I just cut it down from there.

///Peter

BDW

unread,
Oct 28, 2011, 9:23:03 AM10/28/11
to LaTeX Users Group
Thanks, Peter. I just managed to convert the eps files to grayscale-
pdf with GSView. I couldn't configure GIMP to use ghostscript, because
of administrator-rights issues.

monochrome and grayscale are basically the same right? Is there a way
to adjust opacity/transparency with GSView? Maybe as an option to
pdfwrite?

BDW

On Oct 25, 3:08 pm, Peter Flynn <anglebrac...@gmail.com> wrote:
> On Tue, Oct 25, 2011 at 1:00 PM, BDW <boudewijn.verkooi...@gmail.com> wrote:
> > Can anyone help me to add a figure (pdf/jpg/png) file as a watermark?
> > It also needs to be shaded (like 50% transparent) and preferably
> > automatic converted to grey-scale when it is a colour-file. One
> > package can only add a text as watermark (shaded), the other one can
> > add a figure, but without transparency/shading.
>
> \documentclass{article}
> \usepackage{graphicx,eso-pic,lipsum}
> \AddToShipoutPicture{%
>   \put(0,0){\includegraphics[height=297mm,width=210mm]{peter.jpg}}}
> \begin{document}
> \lipsum[1]
> \lipsum[2]
> \lipsum[3]
> \end{document}
>
> Just make sure that the image is proportioned correctly for the paper size,
> and that the image is monochromed and gray-scaled appropriately (LaTeX
> cannot do this: you must use a graphics package like GIMP to do that first).
>
> > I already used google a zillion times without help.
>
> Google for latex watermark image, look at the first
> hit<http://filoxus.blogspot.com/2008/01/how-to-insert-watermark-in-latex....>,

Peter Flynn

unread,
Oct 28, 2011, 11:30:34 AM10/28/11
to latexus...@googlegroups.com
On Fri, Oct 28, 2011 at 2:23 PM, BDW <boudewijn....@gmail.com> wrote:
Thanks, Peter. I just managed to convert the eps files to grayscale-
pdf with GSView. I couldn't configure GIMP to use ghostscript, because
of administrator-rights issues.

Are the eps files bitmaps or vectors?
GIMP would just convert the eps files to a bitmap anyway.
 
monochrome and grayscale are basically the same right?

Not quite, but for all practical purposes, yes.
 
Is there a way
to adjust opacity/transparency with GSView?

No. PostScript has no transparency. If you want transparency, you must use PDF.
But if these are for a watermark, why do you want transparency? They will go underneath everything else, so just make them very pale grey.
 
Maybe as an option to pdfwrite?

I haven't looked.

///Peter

 

Reply all
Reply to author
Forward
0 new messages