comments property
SignOptions.comments property
Specifies comments on the digital signature. Default value is empty string().
@property
def comments(self) -> str:
...
@comments.setter
def comments(self, value: str):
...
Examples
Shows how to digitally sign documents.
# Create an X.509 certificate from a PKCS#12 store, which should contain a private key.
certificate_holder = aw.digitalsignatures.CertificateHolder.create(MY_DIR + 'morzal.pfx', 'aw')
# Create a comment and date which will be applied with our new digital signature.
sign_options = aw.digitalsignatures.SignOptions()
sign_options.comments = 'My comment'
sign_options.sign_time = datetime.datetime.now()
# Take an unsigned document from the local file system via a file stream,
# then create a signed copy of it determined by the filename of the output file stream.
with open(MY_DIR + 'Document.docx', 'rb') as stream_in:
with open(ARTIFACTS_DIR + 'DigitalSignatureUtil.sign_document.docx', 'wb') as stream_out:
aw.digitalsignatures.DigitalSignatureUtil.sign(stream_in, stream_out, certificate_holder, sign_options)
See Also
- module aspose.words.digitalsignatures
- class SignOptions