5 Answers
5

You can use the everypage module to execute Latex code just before each page is shipped. You can use PS specials to put in things like watermarks in the page (cf. the watermark package in the ncctools bundle, which I belive uses this technique), or overlay graphics on the page using PS drawing packages.

Now tested, it works. But notice that it only works on pages whose page style is actually plain. Some pages – e.g. \part title pages – automatically define their page to have some other page style. This can of course be addressed by redefining those page styles as well. But I guess that using fancyvrb or the packages mentioned by Charles save a bit of work.