Add encryption for Zend_Pdf

September 21, 2009

Over the weekend, I have ported the encryption code from FPDF_Protection (http://www.fpdf.de/downloads/addons/37/) to Zend_Pdf. I can’t extend the code from Zend_Pdf to add this feature, so I have tweak a code file : Zend_Pdf_ElementFactory. I feel a little guilty on that😀.

Limitation:

  • When conduct testing, I see that we can’t create un-attached page. Attached page always works.
  • As a port from FPDF_Protection, it only allows encryption with 40 bits length and permissions : print, modify, copy, annot-forms.
  • FPDF_Protection doesn’t take document Id to build encryption key so it resets document id to empty. So does this library.

Credit:

References:

Hope that this little library is helpful for you guys. It’s my first contribution to zend framework community after a long time of using it so I am over exited to see your feedback.

Download from google code.


Follow

Get every new post delivered to your Inbox.