[Tex/LaTex] Blur the whole document and add a demo watermark on each page

fontswatermark

This question is about blurring text but it is not about blurring everything in the document. This shows how to add the watermark over all pages (but it does not work with pictures, this shows how to do it with some extra star over pictures).

How can I blur the whole document and add a DEMO watermark on each page and possibly leave only one sentence without blurring?

Best Answer

Using Gonzalo's code with tikz

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

\newsavebox{\waterbox}
\begin{lrbox}{\waterbox}
\begin{tikzpicture}[remember picture]
 \fill[draw,white,opacity=0.7] ([shift={(2,2)}]current page.south west) rectangle (current page.north east);
 \node[text width = 2in,rotate=-45] at ([shift={(10mm,10mm)}]current page.center) {Some text here that appeas dark and rest is blurred};
\end{tikzpicture}
\end{lrbox}

\newwatermark*[allpages,angle=45,scale=3,xpos=0,ypos=0]{\usebox{\waterbox}}

\begin{document}

\lipsum[1-2]
\begin{figure}[!ht]
\centering
\includegraphics[width=3cm]{example-image-a}
\end{figure}
\lipsum[1-2]
\lipsum[1-20]
\end{document}

enter image description here

You have to adjust the position of text in

\node[text width = 2in,rotate=-45] at ([shift={(10mm,10mm)}]current page.center) {Some text here that appeas dark and rest is blurred};

Now with eso-pic.

\documentclass{article}
\usepackage{tikz}
\usepackage{lipsum}

\newsavebox{\waterbox}
\begin{lrbox}{\waterbox}
\begin{tikzpicture}[remember picture]
 \fill[draw,white,opacity=0.7] ([shift={(2,2)}]current page.south west) rectangle (current page.north east);
 \node[rotate=45,text width = 0.5\textwidth,scale=2,anchor=center,align=center] at ([shift={(0.6\paperwidth,1cm)}]current page.west) {Some text here that appeas dark and rest is blurred};
\end{tikzpicture}
\end{lrbox}

\usepackage{eso-pic}
\AddToShipoutPictureFG{%
\usebox{\waterbox}
}

\begin{document}

\lipsum[1-2]
\begin{figure}[!ht]
\centering
\includegraphics[width=3cm]{example-image-a}
\end{figure}
\lipsum[1-2]
\lipsum[1-20]
\end{document}

enter image description here

Related Question