atbegshi
Execute stuff at \shipout time.
This package is a modern reimplementation of package
everyshi, providing various commands
to be executed before a \shipout command. It makes use of
e-TeX’s facilities if they are available. The package may
be used either with LaTeX or with plain TeX.
The package is part of the oberdiek bundle.