How to verify if signature field is filled with any signature or not using python?


I am using python for my project and I am actively looking for a solution to validate if the annotated field is already signed or not?

kindly help me to find this

Yes definitely.

To check if the signature is crypto graphically signed you can call this API

You can also, with or without the call above, check if the field is visually signed.

See this sample code for usage.

Hi, Thanks for responding.

I am currently using a different process to capture the text fields like the below code.

doc = PDFDoc()
field = doc.GetField("first_name_annotated_field")

type = field.GetType()

if type == Field.e_text:"Text")
    if field.GetValue():
        print("Field Value: ")
    field_type = "Text"
    field_value = field.GetValueAsString()

In the above process, I am able to capture what was there in the pdf in field_value. just like that I also can identify if the field is a signature field or not in the below code?

if type == Field.e_signature:
        field_type = "Signiture"

Can you help me if I can find out if the signature is already there wrt to the annotated field using above code?