# Transparent foreground watermark

As a follow-up to Add watermark that overlays the images, I'd like to have a transparent foreground watermark that doesn't render the underlying content, i.e. text and images, illegible. Is that possible?

I'm especially interested in using that on a couple of beamer slides in which I'd like to put a semi-transparent watermark/banner above a couple of pictures.

-

Yes, it's possible. You can use TikZ to place the watermark inside a \node and then use the opacity key:

\documentclass{beamer}
\usepackage[printwatermark]{xwatermark}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{lipsum}

\newsavebox\mybox
\savebox\mybox{\tikz[color=red,opacity=0.3]\node{DRAFT};}
\newwatermark*[
allpages,
angle=45,
scale=6,
xpos=-20,
ypos=15
]{\usebox\mybox}

\begin{document}

\begin{frame}
\lipsum[4]
\centering
\includegraphics[width=3cm]{example-image-a}
\end{frame}

\end{document}


-
Perfect! That's exactly what I was looking for. Thank you very much for that solution! –  SFAB Sep 11 '13 at 9:02
Maybe @AhmedMusa could have a look at that, too, and add it as an option within the xwatermark package? –  SFAB Sep 15 '13 at 12:49

While I like the simplicity of the tikz solution, here's a pstricks solution. This solution does not allow you to automatically create a watermark for each page. But, it does allow you to place a personalized watermark in the foreground for a given page.

\documentclass{beamer}
%% called for scalebox
\usepackage{graphicx}
%% pstricks packages needed.  Also, need \SpecialCoor to parse post
%% script commands fed to \rput for the angle.
\usepackage{pst-abspos,pst-text}
\SpecialCoor
%% Instead of using \scalebox as I have below, you could define your
%% own font to be used for the watermark.  But the approach I've taken here
%% is a bit more flexible if you intend to use multiple and different watermarks
%% throughout your document which you may want scaled differently.
\DeclareFixedFont{\WM}{T1}{ptm}{b}{n}{3cm}
\usepackage{lipsum}
\newcommand{\createWatermarkOrigin}{\pstSetPostScriptOrigin}
%% this is use to adjust where pstricks places the absolute coordinates.
%% In other documentclasses, this is 1in from the top, and 1in from the left edge of the
%% paper.  In beamer, the setting seems to come out differently.
\def\centercorrection{1.30in}
%% #1 -> content of watermark
%% #2 -> magnification for watermark
\pstPutAbs(\dimexpr0.5\paperwidth-\centercorrection\relax,
-\dimexpr0.5\paperheight-\centercorrection\relax)%%
{\rput{! \number\paperheight\space \number\paperwidth\space atan }
(0,0)%%'
{\pscharpath[linestyle=none,opacity=0.5,fillstyle=solid,fillcolor=red]
{\scalebox{#1}{#2}}}}}
\begin{document}

\begin{frame}\createWatermarkOrigin
\lipsum[4]

\centering
\includegraphics[height=0.75in]{example-image-a}


This is a two step process. When you open the beamer frame you must call \createWatermarkOrigin. This macro creates a coordinate system for the beamer frame. I've had to do a bit of tweaking because the usual reference point is shifted (see comments in the MWE for more details).
After setting up the coordinate system, you may call \addWatermark which takes an optional argument for scaling, and a mandatory argument for the content of the watermark.