PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jul 14, 2024 2:47 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problem with PermitPrint
PostPosted: Tue Oct 11, 2011 6:29 am 
Offline

Joined: Tue Oct 11, 2011 6:19 am
Posts: 2
Hello everyone,
I just started using PDFsharp and I'm having trouble makin a pdf that doesn't allow printing
the code is:
Code:
           PdfDocument doc = new PdfDocument();
                    PdfSecuritySettings securitySettings = doc.SecuritySettings;
                   
                    securitySettings.PermitAccessibilityExtractContent = false;
                    securitySettings.PermitAnnotations = false;
                    securitySettings.PermitAssembleDocument = false;
                    securitySettings.PermitExtractContent = false;
                    securitySettings.PermitFormsFill = true;
                    securitySettings.PermitFullQualityPrint = false;
                    securitySettings.PermitModifyDocument = true;
                    securitySettings.PermitPrint = false;

                    //...
                    //the code that creates a pdf file
                    //...

                    doc.Save(destinaton);
                    doc.Close();


but this produces the file in which the printing is enabled.
What could be the probelm with this code?

Is there a possibility to set some permissions for specific users in the file (from a domain, maybe)?


Thanks in advance


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2011 7:26 am 
Offline

Joined: Tue Oct 11, 2011 6:19 am
Posts: 2
oh, I've found out that I have to set an owner password for the security to work.

But my second question still stands: Is it possible, for example, to set that only the creator of the document has rights to print it but nobody else has rights?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2011 8:17 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3101
Location: Cologne, Germany
madafakaniga wrote:
Is it possible, for example, to set that only the creator of the document has rights to print it but nobody else has rights?

I don't know - this is not a PDFsharp question, this depends on how Adobe Reader treats those permissions.
So just give it a try.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 28 guests


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:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group