I have a followup question to the previously provided answer. Since my text is NOT fixed and might change dynamically I have problems to center the watermark in the middle of the page
\documentclass{article}
\usepackage{pdfpages,xcolor}
\usepackage{eso-pic}
\usepackage{kantlipsum}
\usepackage[Export]{adjustbox}
\usepackage{transparent} % used in watermark
\AddToShipoutPictureFG{
\AtPageCenter{
{
\rotatebox[origin=c]{55}{
\adjustbox{cfbox=red {\fboxrule} 5mm, width=28cm, min height=2cm, max height=2cm}
{\transparent{0.3}\fontsize{3cm}{3cm}\bfseries\textcolor{red}{
%DRAFT%
Automatischer Text%
}}
}
}
}
}
\begin{document}
\kant
\end{document}
I know I use some \put to adjust the rotated box but this is dependent on the length of the text. Basically I want to have the center of the rotated in the middle of the page. Various attempts of using \AtPageCenter, \AtPageLowerLeft failed as well to specify the origin of the \rotatebox. The angle of 55° fits well for a A4 paper.
Any hints how to solve it?
BTW: Using lualatex 1.16.

backgroundat the time - especially since I found this solution. Would be interesting to see what difference it has nowadays. – LeO May 10 '23 at 15:14