I have been working with converting some documents I am drawing with GDI+ into standard PDF documents. Everything seems to be working great but as icing on the cake I decided to add in security on those new documents so my users can protect the information they are sending around. The problem is that in Acrobat 9.1.0 it seems like the security shows up fine in the "show details..." screen but not under the "Document Restrictions Summary". All this is to say that no matter what I set the security to be, it is not enforced.
A very rough version of my code is:
Code:
// create the document here
...
// apply the security settings
objDocument.SecuritySettings.UserPassword = "user";
objDocument.SecuritySettings.PermitPrint = false;
objDocument.SecuritySettings.PermitExtractContent = false;
// draw many graphics
...
// close the document
objDocument.Close();
When I open the result of this code in Acrobat Reader 9.1.0 the user can still print, and copy content. I looked into the actual PDFSharp code and compared with the PDF specification but I cannot figure out what might be missing. Any ideas what is wrong?