sign_time property

DigitalSignature.sign_time property

Gets the time the document was signed.

@property
def sign_time(self) -> datetime.datetime:
    ...

Examples

Shows how to validate and display information about each signature in a document.

doc = aw.Document(MY_DIR + 'Digitally signed.docx')
for signature in doc.digital_signatures:
    print(f"\n{('Valid' if signature.is_valid else 'Invalid')} signature: ")
    print(f'\tReason:\t{signature.comments}')
    print(f'\tType:\t{signature.signature_type}')
    print(f'\tSign time:\t{signature.sign_time}')
    # System.Security.Cryptography.X509Certificates.X509Certificate2 is not supported. That is why the following information is not accesible.
    #print(f"\tSubject name:\t{signature.certificate_holder.certificate.subject_name}")
    #print(f"\tIssuer name:\t{signature.certificate_holder.certificate.issuer_name.name}")
    print()

See Also