PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Problem with PermitPrint
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1814
Page 1 of 1

Author:  madafakaniga [ Tue Oct 11, 2011 6:29 am ]
Post subject:  Problem with PermitPrint

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

Author:  madafakaniga [ Tue Oct 11, 2011 7:26 am ]
Post subject:  Re: Problem with PermitPrint

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?

Author:  Thomas Hoevel [ Tue Oct 11, 2011 8:17 am ]
Post subject:  Re: Problem with PermitPrint

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/