I am using a PHP-based CMS for a private members site and need to implement a feature whereby whenever a user downloads a PDF, every page of the PDF gets watermarked clearly with something containing the username of the downloading user.
I previously used the Zend PHP library to add metadata in the Author field of the PDF containing the username, but the requirement has changed to show something visible to the user to act as a deterrant for sharing the document.
As far as I can tell, it’s not possible (or at least simple) to do this using PHP. Is there an alternative to either do this using PHP or to serve the PDF downloads through another application that watermarks it on the fly?
One simple effective approach to this problem can be achieved with fpdf by rotating some watermark so that it’s written across the page. Then You write on top of that. See http://www.fpdf.de/downloads/addons/9/