SigFieldLock - Problem with sign pdf with certificate - document altered

Hello

I am trying to sign pdf by certificate. I am using syncfusion. Here is piece of code:
Image_9173_1696079806024

It works, but if pdf has this property:SigFieldLock

In acrobat reader you can find it here

Image_5580_1696079719891

and here from rups
Image_1612_1696079960221

After signing such pdf and opening in acrobat reader, it says that document has been altered.
I i remove this property(Set to option "Nothing happens when signed" in acrobat). Then it signed successfully.

Can it be resolved by syncfusion library ?

Thank you very much for help


8 Replies 1 reply marked as answer

RB Ravikumar Baladhandapani Syncfusion Team October 4, 2023 04:44 PM UTC

Upon further analysis, the locked document does not allow us to sign or fill the form fields. If we sign the document, the signature will be invalid or failed. We do not have support to unlock the PDF document, but we do support locking the signatures by using the lock method available on the PdfSignature or PdfLoadedSignatureField. This is our default behavior.



JH Jakub Hromada replied to Ravikumar Baladhandapani October 5, 2023 06:25 PM UTC

I am not sure if we understand each one correctly :) So i made a basic example of the problem in visual studio
The pdf Empty-NoAction.pdf ​in example is signed correctly

The pdf Empty-WithAction.pdf in example is not signed correctly.

Only diffence in pdf is in this:

Image_5302_1696530179622




So is it possible to sign successfully pdf Empty-WithAction.pdf by syncfusion library ? Or i must find another way how to accomplish it ?

Thank you very much for help


Attachment: ExampleSyncfusion_3af2f029.zip



RB Ravikumar Baladhandapani Syncfusion Team October 6, 2023 12:44 PM UTC

Currently, we are analyzing the possibilities of signing a pdf document that contains a signature lock and will update the further details on October 10th 2023.



RB Ravikumar Baladhandapani Syncfusion Team October 10, 2023 12:56 PM UTC

On our further analysis, we have checked the provided document in our library. The signatures are valid and the document is not modified and also not provide any validation errors. In Adobe Reader, The behavior of digital signatures in PDF documents can be affected by several factors, and if not done correctly, it may appear as if the signature is invalid. If you make a field, such as a textbox, read-only after signing, it's still possible to invalidate the signature by modifying the document in ways that aren't explicitly controlled by the field's read-only property. We have created the sample to check the signature status in our pdf library .Kindly check the attached sample and screenshot


Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Empty-WithAction-Signed-3080269



JH Jakub Hromada replied to Ravikumar Baladhandapani October 10, 2023 02:59 PM UTC

Thanks for answer

So if i understand it correctly, you are saying from view of syncfusion library is it signed correctly.
And acrobat reader evaluated it wrong ?

Problem is that most of clients use acrobat reader, and also is a nice tool to check that pdf is ok :).

Jakub Hromada



RB Ravikumar Baladhandapani Syncfusion Team October 12, 2023 11:38 AM UTC

Upon further analysis, we have determined that the issue is caused by a locked signature field. We have identified this as a defect on our end, as we did not properly handle the locking of empty signature fields before signing PDF documents. We will include the fix for this issue in our upcoming weekly release, scheduled for October 24th, 2023.


Please use the below feedback link to track the status of the reported bug.

Signature is invalid while signing the particular pdf document in ASP.NET Core | Feedback Portal (syncfusion.com)


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.”


Marked as answer

JH Jakub Hromada October 12, 2023 11:50 AM UTC

Thanks very much for fixing the problem.

Looking forward for the fix.

Jakub Hromada



RB Ravikumar Baladhandapani Syncfusion Team October 24, 2023 01:23 PM UTC

We have included the fix for this issue Signature is invalid while signing the particular pdf document in our latest weekly release (23.1.42).Please use the below link to download our latest NuGet,


Nuget Link: NuGet Gallery | Syncfusion.Pdf.Net.Core 23.1.42


Loader.
Up arrow icon