PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Oct 16, 2018 12:55 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Apr 21, 2009 1:13 am 
Offline

Joined: Tue Apr 21, 2009 1:03 am
Posts: 2
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?


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 24, 2009 5:08 pm 
Offline

Joined: Wed Jun 24, 2009 4:58 pm
Posts: 2
Hello,
i was having the same problem. Just define the OwnerPassword write only property.

ex:
document.SecuritySettings.OwnerPassword = "noPrintingAllowed"

chapas


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 24, 2009 6:24 pm 
Offline

Joined: Tue Apr 21, 2009 1:03 am
Posts: 2
Thank you for the reply. Unfortunately the "solution" does not work. I have tried each of the various settings, including the owner password, but to no avail. I believe the core issue is that Acrobat Reader "9" doesn't respect the security settings. Earlier versions of adobe reader as well as Foxit seemed to respect these settings. This would work except that I expect most to be using the latest reader, making the security worthless. If anyone else has any ideas I'm still always looking for suggestions.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 29, 2014 11:47 pm 
Offline

Joined: Thu May 29, 2014 5:05 pm
Posts: 5
To enforce PDF security features, you need to set the encryption to 128 Bit or 40 bit.
Code:
document.securitySettings.DocumentSecurityLevel = PdfDocumentSecurityLevel.Encrypted128Bit


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group