|
Posted by Scott Teglasi on 08/02/05 19:09
Hi all,
I've been wrestling around with finding a way of password-protecting
existing PDF documents with custom passwords, all on-the-fly, using PHP.
I've found some commercial implementations of doing this, but was
looking for something without a price tag attached to it. :)
I came across the FPDF library, but that only creates PDFs, not modify
existing ones. Further searching around revealed FPDI, a couple of
classes that can read existing PDFs and modify them. However that
didn't give me the security features I was looking for.
Finally, I came across another class, FPDF_Protection, which DOES apply
password-protection as well as encryption for creating PDF documents..
The problem is that there isn't any easy way to marry the two together..
FPDI uses some of its own custom classes (ie FPDI_tpl 'templates'),
and FPDF_Protection is just extended from the FPDF class.
I'm thinking of mashing the two classes together somehow
(FPDF_Protection and FPDI), but if there's an easier way around it.... :)
Has anyone had experience doing this sort of thing? (Password-protecting
existing PDFs on-the-fly) If so, what was your solution?
Scotty
[Back to original message]
|