Hello,
I have the following behaviour : Always the first signature becomes invalidated as you can see in this photo.
I mention that this did not happen in the past, all signatures remained valid. with the same code.
"
PdfLoadedDocument document = new PdfLoadedDocument(bytes);
PdfCertificate certificate = new PdfCertificate(digitalID);
PdfStandardFont font = new PdfStandardFont(PdfFontFamily.Helvetica, this.font);
Syncfusion.Pdf.Security.PdfSignature signature = new Syncfusion.Pdf.Security.PdfSignature(document, document.Pages[0], certificate, "DigitalSignature");
signature.Bounds = new Syncfusion.Drawing.RectangleF(this.xStart, this.yStart, width, height);
signature.EnableValidationAppearance = true;
signature.Settings.CryptographicStandard = CryptographicStandard.CADES;
signature.Settings.DigestAlgorithm = DigestAlgorithm.SHA512;
signature.IsLocked = false;
signature.Appearance.Normal.Graphics.DrawString("" + this.signText + certificate.SubjectName.ToString() +
//" cu certificat cu token calificat!" +
$" {this.text_timestamp} "
+ DateTime.Now.ToString("MM/dd/yyyy HH:mm"), font, PdfBrushes.Black, width,height);
"
Please, can I have some help about problem understading and how to solve it?
Thank you, any insight would be helpful!
I want to add that we are working on a testing environment so far, and this behaviour happens when a person signs with the same certificate twice (doesn't matter if the certificate is qualified or not), the first signature becomes invalid.
For example, if I sign with a certificate, it is valid, someone else signs with a certificate, now 2 are valid, I sign again with a certificate now my first signature is invalid and my second signature is valid.
We have checked the reported behavior with the provided details on our end. We can able to add multiple signatures to the pdf document with different certificates without any issues. we have attached a sample with our test certificates for your reference. Can you please check this on your end and let us know the result?
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Net6.0Sample999906152
Output: https://www.syncfusion.com/downloads/support/directtrac/general/pd/MultipleSign_1173197572
Follow the below links for more information,
If you are still facing an issue, we request you share the modified sample with test certificates to replicate the issue on our end. So that we can assist you further in this.
Note: we maintain the confidentiality of the information disclosed by our customers to us. Therefore, any documents shared with Syncfusion will only be used to replicate the issue and will not be shared with anyone else. So kindly share the original input document or share the input document after removing confidential information.
After conducting a thorough analysis, we have discovered that you may be attempting to sign the PDF document using the same signature name. Unfortunately, the grouping between the signature fields with similar names has failed to occur, resulting in this issue. To resolve this problem, we suggest using different names for the signature fields and we also offer an API known as FieldAutoNaming. By setting the API to "false," you can successfully group fields with similar names, thereby preventing them from becoming invalid. However we have discovered a known issue with this API and we will provide further details on July 17th, 2023. For your convenience, we have included a sample document and the corresponding output document. Please test this solution on your end and inform us of the outcome.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Net6.0Sample-854261896
Output:
We confirmed the issue “The auto-naming issue occurs when signing an existing PDF document with the same signature name” as a defect in our product and we will include the fix in our upcoming weekly NuGet release, which will be available on July 25th, 2023.
Please use the below feedback link to track the status of the reported bug.
Note: If you require a patch for the reported issue in any of our Essential Studio Main or SP release versions, then kindly let us know the version, so that we can provide a patch in that version based on our SLA policy.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
Since our 2023 volume 2 sp1 release is expected to be rolled out in the upcoming week. There will be no weekly release this week. We will include the fix for the reported issue in after our Volume 2 sp1 release which we excepted at the end of July.
Please use the below feedback link to track the status of the reported bug. https://www.syncfusion.com/feedback/45349/the-auto-naming-issue-occurs-when-signing-an-existing-pdf-document-with-the-same
Note: If you require a patch for the reported issue in any of our Essential Studio Main or SP release version, then kindly let us know the version, so that we can provide a patch in that version based on our SLA policy.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
We are glad to announce that our Essential Studio 2023 Volume 2 Service Pack release v22.2.5 is rolled out and We have included the fix for this reported issue with “The auto-naming issue occurs when signing an existing PDF document with the same signature name” in this release. It is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Please use the below feedback link to track the status of the reported bug. https://www.syncfusion.com/feedback/45349/the-auto-naming-issue-occurs-when-signing-an-existing-pdf-document-with-the-same