Add encryption for Zend_Pdf

Over the weekend, I have ported the encryption code from FPDF_Protection ( 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 :D.


  • 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.



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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: