We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to Enable/Disable re-sign pdf after pdf has been signed with syncfusion

Hi,

I would like to know if there is an option/property that allows me to re-sign a PDF.
For example if value set to true => so I can re-sign with Adobe reader for example
If value set to false => no one can re-sign after the first signature done with syncfusion

Thanks for your help

2 Replies

SL Sowmiya Loganathan Syncfusion Team November 18, 2019 08:43 AM

Hi Clement, 

Thank you for contacting Syncfusion support.  

We can achieve your requirement by using the properties “Certificated” and “DocumentPermissions” of PdfSignature.  If we set document permission as ForbidChanges and enable the Certificated property, the first signature fails if we resign the document.  

Code Snippet:  

//Creates a digital signature 
PdfSignature signature = new PdfSignature(document, page, pdfCert, "Signature"); 
 
//Sets signature information 
signature.Bounds = new RectangleF(bounds); 
 
signature.Certificated = true; 
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges; 

Output document screenshot:  
   

At the same time, if we choose document permission as AllowComments/AllowFormFill and enable the Certified property, the first signature is valid even if we sign another signature to the document. 

Code Snippet: 

//Creates a digital signature 
PdfSignature signature = new PdfSignature(document, page, pdfCert, "Signature"); 
 
//Sets signature information 
signature.Bounds = new RectangleF(bounds); 
 
signature.Certificated = true; 
signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill | PdfCertificationFlags.AllowComments; 


Output document screenshot:  

 

Note: The document permissions only work when we enable the Signature.Certificated  property. 

Kindly try the above solution in your end and let us know the if it satisfies your requirement.  

Regards, 
Sowmiya Loganathan 




CG Clement GIL November 18, 2019 09:50 AM

Ok thanks for you help. 
Best Regards.

Clément

Loader.
Live Chat Icon For mobile
Up arrow icon