Welcome to WebmasterWorld Guest from 188.8.131.52
I have a client who sells his e-book via a paypal interface.
The client is very concerned about the security of his e-book.
I have set him up an awesome file serving system that serves the file sercurely after paypal.. but now my client is asking if I can put some form of tracking system in the pdf.
So when someone downloads the pdf, I need to put something
(probabbly an md5 of the purchaser's email)
in the pdf, so that if a copy of the pdf does leak out to the public,
We can trace it to the purchaser.
How can i go about this without blowing up the file.
Ive looked into PDFlib.. and after some reading, they will put their watermark on my pdf unless I purchase a 2000$ key.....
FPDF also looked like it might do what i need, if i use the FPDI extension.
Has anyone here has any experience with these?
Is there a simpler way to acheive this, then trying to use this new class?
I've done exactly what you need for free using FPDF and the FPDI extension you mentioned. It took awhile to find the solution, and some playing to get the values just right, but it works great. I sell an ebook on one of my sites, and when someone does the purchase my script licenses and watermarks each page of the ebook at download time with a dynamic serial number consisting of things like time and PayPal Transaction ID numbers.
The trick is to do it page by page and rebuild the pdf file from scratch. The way the FPDI extension works, I believe, is that it takes a snapshot of what a page of an existing pdf looks like. You can then use FPDF to write a string on top of that snapshot. Loop through every page in your ebook, building the download as you go, and then offer it up via the script using pdf headers.
Works like a charm, and you can use the serial number to track when and who downloaded if you ever find a copy floating around.