Changing view of signature field in PDF after validation?

Hello,

Do you have any code example to let me see how to change signature field on PDF file page after validation.

Please look at “271717061600063_ficha_tecnica.pdf” file I attached. It contains a signature on page 1, that looks like “validity unknown.bmp” if I open it in Acrobat Pro.

Now I have code snippet from your web site to validate this signature. But after this I need to print this PDF file (or asve it as another PDF file) with “signature is valid” status. Something like you can see on “signature is valid.jpg” file I also attached.

Mikahel

signature-validation.zip (87.0 KB)

‘’’
Using pdfFileSignature = New PdfFileSignature()
pdfFileSignature.BindPdf(sPDFFile)

If Not pdfFileSignature.ContainsSignature() Then
    Exit Sub
End If

For Each sigName In pdfFileSignature.GetSignNames()
    If String.IsNullOrEmpty(sigName) Then
        Continue For
    End If

    If pdfFileSignature.VerifySignature(sigName) Then
        Console.WriteLine("Signature Verified")

        ' How to change sifnature field view here ???
    End If
Next

End Using
‘’’

@Mikhael

When you say changing the signature field, do you mean remove the existing signatures and create a new signature field with valid signatures at the same location?

@asad.ali ,

As I can see in Acrobat, visually it looks like it just replaced yelow question mark to green check mark and also replaced text “validity unknown” to “signature is valid”.

So, it seems, that this task can be solved if I just clone PDF signature block and replace question mark image to the green check mark image or to the red cross image and also change text “validity unknown” to “signature is valid” or to “Invalid signature”.

After this I can print this PDF file.

Please let me know if my idea looks workable or not.

And please tell me if I can release this trick using Aspose.PDF.

Mikhael
acrobats behavior.zip (130.3 KB)

@Mikhael

We think that this signature validity text as well as the icon is handled by Acrobat Reader internally. We need to investigate whether we can change them using the API or not. For the purpose, an investigation ticket as *PDFNET-57587 has been logged in our issue tracking system. We will look into the details and let you know if it is resolved. Please spare us some time.