# Repeated and rotated text watermark on the whole document

I need to fill the page (100%) with the watermark text repeated and rotated under 45 degrees. I should to do it for every page in document. This code works good, but in this case I have only one watermark at center.

\documentclass{article}
\usepackage{tikz}
\usepackage{pdfpages}
\pagestyle{empty}
\newcommand{\filename}{/home/Documents/c.pdf}
\newcommand{\watermark}{\tikz[remember picture, overlay]  \node [black,opacity=0.1,rotate=45,scale=4.0] at (current page.north west)  {This is watermark text to repeat again and again} -- (current page.south east);}

\begin{document}
\foreach \index in {1,...,\the\pdflastximagepages}
{
\includepdf[pages=\index,pagecommand={\watermark}]{\filename}
}
\end{document}


Any ideas or suggestions are welcome?

Thank you for your time and help.

• Welcome to tex.sx. Jun 3, 2020 at 13:50
• You can try to use \foreach \pos in {...} to set the node on path (current page.north west) -- node[pos=\pos, ...] {...} -- (current page.south east) and use the trick in tex.stackexchange.com/questions/219478/… Jun 3, 2020 at 14:02
• @ZhiyuanLck thanks. I have updated source code in question. But still getting only one line of watermark.
– Andy
Jun 3, 2020 at 18:47
• You mean you want to cover the page with lots of copies from your text? Jun 4, 2020 at 6:52
• @UlrikeFischer yes, exactly!
– Andy
Jun 4, 2020 at 8:03

\documentclass{article}
\usepackage{tikz}
\usepackage{pdfpages}
\pagestyle{empty}

\newcommand{\watermark}{\tikz[remember picture, overlay]
\node [black,opacity=0.1,rotate=45,scale=4.0] at (current page.center)
{\watermarktext{This is watermark text to repeat again and again}};}

\begin{document}

\includepdf[pages=1,pagecommand={\watermark}]{example-image}

\end{document}


• Great. Thank you so much!
– Andy
Jun 4, 2020 at 10:19