The solutions for my school's assignments all have waterstamps on the PDFs with our username on it.
I was wondering if you guys know how to do something like that using PHP? Do they run a script prior to the download process?
Thanks.
Although there are several very good PDF libs for PHP, if I were writing such a program I'd just shell out to run pdftk but you' still need to generate your watermark.
$tempfile=tempnam();
system("pdftk input_file.pdf background watermark.pdf output $tempfile dont_ask", $errcode);
if (!$errcode && $ih=fopen($tempfile, 'r')) {
header('Content-Type: application/pdf');
fpassthru($ih);
fclose($ih);
} else {
print "Whoops";
}
unlink($tempfile);