Watermark on all pages in a beamer presentation?

305 views Asked by At

I would like to print a watermark on all pages in a beamer presentation: Frontpage/titlepage, table of contents, bibliography etc. All pages. With the code below, a watermark gets printed on the first page only. Is there a way to print a watermark on all pages? PS: I receive an error message that I don't understand.

\documentclass[9pt,trans,xcolor={table},envcountsect]{beamer} % Plain

\usefonttheme[onlymath]{serif}
\usetheme[shownavsym,right]{Aalborg}

\setbeamertemplate{section in toc}[sections numbered] % Automatic enumeration of sections

\definecolor{dgreen}{rgb}{0.,0.6,0.} 
\definecolor{aaublue}{RGB}{33,26,82}% dark blue

\usepackage{etoolbox} % In order to still use an outdated beamer version

\usepackage[printwatermark]{xwatermark}                               
\newsavebox\mybox                                                      
\savebox\mybox{\tikz[color=red,opacity=0.4]\node{Peter Jensen};}       
\newwatermark*[                                                        
    allpages,                                                            
    angle=45,                                            
    scale=4,                                                   
    xpos=-20,                                               
    ypos=10,                                                  
]{\usebox\mybox} 

\begin{document}

\begin{frame}%[allowframebreaks]
    \frametitle{Watermark on this page}
    \tableofcontents
\end{frame}

\begin{frame}{No watermark?}
    Hello world!
\end{frame}

\end{document}
1

There are 1 answers

2
samcarter_is_at_topanswers.xyz On

No need for external package, you can place the watermark via the background canvas template:

\documentclass[9pt,trans,xcolor={table},envcountsect]{beamer} % Plain

\usefonttheme[onlymath]{serif}
\usetheme[shownavsym,right]{Aalborg}

\setbeamertemplate{section in toc}[sections numbered] % Automatic enumeration of sections

\definecolor{dgreen}{rgb}{0.,0.6,0.} 
\definecolor{aaublue}{RGB}{33,26,82}% dark blue

\setbeamertemplate{background canvas}{
\begin{tikzpicture}[remember picture,overlay]
\node[color=red,opacity=0.4,rotate=45,opacity=0.5] at (current page.center) {Peter Jensen};
\end{tikzpicture}
}       


\begin{document}

\begin{frame}%[allowframebreaks]
    \frametitle{Watermark on this page}
    \tableofcontents
\end{frame}

\begin{frame}{No watermark?}
    Hello world!
\end{frame}

\end{document}

enter image description here