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

Hi,

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
https://www.pdftron.com/api/PDFTronSDK/cpp/classpdftron_1_1_p_d_f_1_1_digital_signature_field.html#a71ea894721c606d187c6047d5e868975

You can also, with or without the call above, check if the field is visually signed.
https://www.pdftron.com/api/PDFTronSDK/cpp/classpdftron_1_1_p_d_f_1_1_digital_signature_field.html#a387a023ad271817cb70cbe5000cbe206

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:
    logger.info("Text")
    if field.GetValue():
        print("Field Value: ")
        print(field.GetValueAsString())
    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:
        print("Signiture")
        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?