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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error signing an already signed PDF

Thread ID:

Created:

Updated:

Platform:

Replies:

147079 Aug 31,2019 02:34 AM UTC Sep 4,2019 01:45 PM UTC WinForms 4
loading
Tags: PDF
DavidBS
Asked On August 31, 2019 02:34 AM UTC

Hi,

I'm successfully signing a PDF using the Syncfusion control.
But, when I try to add another valid signature, I got error 0x80070057 = the document may contain at most one author signature.


The first signature has the following propterties:

signature.TimeStampServer = New TimeStampServer(New Uri("http://rfc3161timestamp.globalsign.com/advanced"))
signature.EnableValidationAppearance = False
signature.EnableLtv = True
signature.Certificated = True
        signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill

The document is loaded as follows:

     Dim signature As PdfSignature = Nothing
     
     Try
          Dim CampoDeAssinatura As PdfLoadedSignatureField = TryCast(loadedDocument.Form.Fields(0), PdfLoadedSignatureField)
          signature = New PdfSignature(loadedDocument, page, pdfCert, "SignatureField", CampoDeAssinatura)
     
     Catch ex As Exception
          signature = New PdfSignature(loadedDocument, page, pdfCert, "SignatureField")
     
     End Try


Everything runs OK until the "Save" command, which raises the above error.
The document being signed is the same of the first signature, I mean, I'm signing it normally and trying to resign with another certificate (and all certificates are 100%).

Do you know what is happening here?
I appreciate any help

DavidBS
Replied On August 31, 2019 02:52 AM UTC

Hmmm...
I got the problem and I guess it can be a bug:

If the document is virgin (not signed before) I set "signature.Certified = true" and in opposite (the document is already signed) I set "signature.Certified = false" - and at this point the error raises.

I mean, we cannot set "Certified=false" in an already signed document - we need only to discard the property entirelly.

Ok, some people may consider that setting "Certified=false" is uneccessary anyway since it is the default, but I see as a little bug within the code.

I hope have helped anyone with the same behaviour.




Surya Kumar [Syncfusion]
Replied On September 2, 2019 10:40 AM UTC

Hi David, 

Greetings from Syncfusion. 

Response 
Query 
But, when I try to add another valid signature, I got error 0x80070057 = the document may contain at most one author signature. 
 
 
The first signature has the following propterties: 
 
            signature.TimeStampServer = New TimeStampServer(New Uri("http://rfc3161timestamp.globalsign.com/advanced")) 
            signature.EnableValidationAppearance = False 
            signature.EnableLtv = True 
            signature.Certificated = True 
        signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill 
 
Everything runs OK until the "Save" command, which raises the above error. 
Could you please provide us the stack trace of the exception or error you got along with the PDF in which the error occurs so that we can analyze and provide you exact solution. 
If the document is virgin (not signed before) I set "signature.Certified = true" and in opposite (the document is already signed) I set "signature.Certified = false" - and at this point the error raises. 


 
I mean, we cannot set "Certified=false" in an already signed document - we need only to discard the property entirelly. 
 
We are analyzing this behavior we will let you know more about this on 04-Sep-19. 

Regards, 
Surya Kumar 


Sowmiya Loganathan [Syncfusion]
Replied On September 4, 2019 01:10 PM UTC

Hi David, 

Please note that the property “Signature.Certified” can be set only when the signature is field is created and added to the PDF. Modifying the existing signature in PDF will invalidate the signature present in the PDF.  
So could you please provide us your exact requirement for changing the “Signature.Certified= false” in already signed PDF document, so that we can help you with better solution on the same. 
 
Regards, 
Sowmiya L 


DavidBS
Replied On September 4, 2019 01:45 PM UTC

Thank YOU Sowmyia, yes, you're right but to avoid too much text, let's interact on that:


I appreciate your time, help and efforts.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon