Stamping the pages of the file requires finding a tool that will do that watermarking on-the-fly each time the visitor clicks to download the file they've purchased.
You'll need to find a vendor which provides a PHP-driven tool to do that on-the-fly-watermarking, and customize the code to make use of that tool where needed.