# Lualatex, print over all pages

I'd like to define in Lualatex a way to add a text after each page. For example, add a code that display a big stamp in the middle of the page on top of the text (adbegshi does something similar, but it adds the text at the beginning of the page) that displays the current page number. For now, the following code add this only at the end of the last page.

NB : I do NOT want to use an external file and use pdfpages to include the pages, I'd like to have a solution in one single file.

MWE:

\documentclass{article}
\usepackage{lipsum}
\usepackage{tikz}
\begin{document}%
\lipsum[1-20]
\begin{tikzpicture}[remember picture,overlay]
\node[text=red] at (current page.center) {\Huge \textbf{\thepage}};
\end{tikzpicture}
\end{document}


-- EDIT -- The solution given solve indeed my problem, but I'm curious to know if it's possible to do that in "pure" lualatex, using hooks or something like that. Thanks !

atbegshi offers the command \AtBeginShipoutAddToBoxForeground but normally I do find eso-pic easier to use for this sort of things:

\documentclass{article}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{eso-pic}
\begin{document}%

• there is \AtPageCenter macro with eso-pic which could be used here avoiding loading of tikz. (but I don't know exactly how tikz behaves when putting text at some location, for example here, is the 1 really centered in the page?) – user4686 Nov 11 '17 at 15:38