i want to place on a document randomly a small picture. I use for that the xwatermark and lcg package. The newwatermark within the dokument works fine with the lcg, appart from the fact there is sometimes a text showing up "gray!55".
Now i want a command \randsign that allows me to say how often i want this watermark on the page. But unfortunatley this is not working.
I used this Method for lcg, but it does not work for me. Creating random problems by using rand option
Code snippet below:
\documentclass{article}
\usepackage{lipsum}
\usepackage[printwatermark]{xwatermark}
\usepackage{lcg}
\newcommand{\randsign}[1]{
\foreach \i in {1,...,#1}{
\reinitrand[first=0, last=360, counter=rangle] \rand
\reinitrand[first=-90, last= 90, counter=rxpos] \rand
\reinitrand[first= -130, last=130, counter=rypos] \rand
\newwatermark[allpages,scale=1,align=center,angle=\value{rangle},xpos=\value{rxpos},ypos=\value{rypos},textmark={\includegraphics[width=0.9cm]{./signature.png}}]{} \rand
}
}
\begin{document}
\newwatermark[allpages,scale=1,align=center,angle=\value{rangle},xpos=\value{rxpos},ypos=\value{rypos},textmark={\includegraphics[width=0.9cm]{./signature.png}}]{} \rand
\section{Section watermark}
\randsign{10}
\lipsum[1-6]
\end{document}