I'd like to have a tiled text wallpaper covering the whole page. I have found this old post about the \newwallpaper macro in the xwatermark package, which seems to be able to do what I need.
I cannot seem to understand how to control the size of the font, though. Whatever I do the fontsize option has no effect.
By setting squaretiles=false and specifying xtilesize and ytilesize I can reduce the text size. However the text in the wallpaper seems to be a "stretched image" containing the text rather than an actual text.
Here's a mwe
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[a4paper, total={18cm, 26cm}]{geometry}
\usepackage{xcolor}
\usepackage[printwatermark]{xwatermark}
\usepackage{lipsum}
\newwallpaper[%
page=1,fontfamily=cmr,fontsize=10pt,textcolor=gray!10,
textalign=center,textangle=0,tilexoffset=10pt,squaretiles=false,tilexsize=4.0cm,tileysize=1.0 cm,
tileyoffset=10pt,boxalign=center,picontoptext=false,wpxoffset=0cm,
]{some text}
\begin{document}
\lipsum[3]
\lipsum[5]
\end{document}
This is a problem for me, because the text in the wallpaper should have different lengths for different documents.
Here's what I get with a longer text

The font size decreases, and it seems to me that it's compressed along the line (different aspect ratio).
It would be better for me to have an actual repeated text with a fixed size rather than a stretched image. I thought this was controlled via the fontsize and fontfamily parameters, but neither of them seem to have any effect. I also tried with normal text, to no avail.
I am reading the xwatermark guide, but I have not understood what I'm doing wrong, yet.

! Extra \endgroup.\document ->\endgroup. – Ulrike Fischer Mar 19 '21 at 18:19