[Tex/LaTex] Xwatermark throws error

miktexpdftexxwatermark

I am using MikTeX with PDFLaTeX and it has worked fine. After an update if MikTeX xwatermark throws an error:

! Extra \endgroup. 
\document ->\endgroup 
\let \BeforeStartOfDocument \@firstofone \cpt@beforest... 
l.5 \begin{document} 
Things are pretty
mixed up, but I think the worst is over.

Test tex file:

\documentclass{article}

\usepackage{xwatermark}

\begin{document}
Text
\end{document}

But as I understand it Xwatermark has not been updated since 2012!? What could be producing the error?

Best Answer

I ran into the same problem and now use this...

\usepackage{eso-pic}

...

\AddToShipoutPictureFG{
          \begin{tikzpicture}[remember picture, overlay]
              \node[opacity=0.5, inner sep=0] at (current page.center)
                  {\includegraphics{data/images/watermark}};
          \end{tikzpicture}
}