The flag that allows signing with a certificate whose validity period has ended. The default value is False; signing with an expired certificate raises GroupDocsSignatureException and the document is not signed.
The flag that allows signing with a certificate whose validity period has not started yet. The default value is False; signing with such a certificate raises GroupDocsSignatureException and the document is not signed.
The left X position of the signature area on the document page in measure units (pixels, percents, or millimeters as defined by MeasureType.location_measure_type).
The width of the signature area on the document page in measure values (pixels, percents, or millimeters). The measurement unit is defined by MeasureType via the SizeMeasureType property.
The shape position defines where the shape should be presented in the document layout. Available only for Word documents. (inherited from ImageSignOptions)
The Z-order position of the text signature, which determines the display order of overlapping signatures. (inherited from SignOptions)
Example
fromgroupdocs.signatureimportSignaturefromgroupdocs.signature.optionsimportDigitalSignOptionsdefsign_with_digital_signature_advanced():withSignature("sample.pdf")assignature:# Pass the certificate and the appearance image to the constructoroptions=DigitalSignOptions("certificate.pfx","signature.jpg")options.password="1234567890"# Show the signature on the page, at this position and sizeoptions.visible=Trueoptions.left=100options.top=400options.width=200options.height=100# Information stored in the signatureoptions.contact="John Smith"options.reason="Approval"options.location="New York"result=signature.sign("signed_digital_advanced.pdf",options)print(f"Signed with {len(result.succeeded)} digital signature(s)")if__name__=="__main__":sign_with_digital_signature_advanced()