MetadataSignOptions class
Leave feedback
On this page
Represents Metadata signature options.
Learn more
- Basic usage of creating Metadata electronic signature by GroupDocs.Signature: https://docs.groupdocs.com/display/signaturenet/eSign+document+with+Metadata+signature
- Advanced usage of settings of Metadata electronic signature with GroupDocs.Signature: https://docs.groupdocs.com/display/signaturenet/Sign+document+with+Metadata+signature+-+advanced
The MetadataSignOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the MetadataSignOptions class with default values. |
| init | Initializes a new instance of MetadataSignOptions with metadata. |
| Method | Description |
|---|---|
| add | Add existing MetadataSignature instance to collection. |
| add_image_signature | Creates a new ImageMetadataSignature with the given arguments and adds it to the collection. |
| add_image_signature_uint16 | |
| add_metadata_signature | |
| add_pdf_signature | Creates a new PdfMetadataSignature with the given arguments and adds it to the collection. |
| add_pdf_signature_file | |
| add_pdf_signature_string |
| Property | Description |
|---|---|
| data_encryption | The implementation of IDataEncryption used to encrypt all metadata signatures in this options collection. |
| signatures | The metadata signatures associated with the signature. |
| all_pages | The signature will be placed on all document pages. (inherited from SignOptions) |
| appearance | The additional signature appearance. (inherited from SignOptions) |
| document_type | The document type of the signature options (DocumentType). (inherited from SignOptions) |
| extensions | The signature extensions. (inherited from SignOptions) |
| hash_algorithm | The hash algorithm to be used for cryptographic operations. Supported exclusively for digital signatures in PDF files. (inherited from SignOptions) |
| page_number | The document page number for signing. (inherited from SignOptions) |
| pages_setup | The options to specify pages to be signed. (inherited from SignOptions) |
| signature_type | The signature type (SignatureType). (inherited from SignOptions) |
| zorder | The Z-order position of the text signature, which determines the display order of overlapping signatures. (inherited from SignOptions) |
from datetime import datetime
from groupdocs.signature import Signature
from groupdocs.signature.options import MetadataSignOptions
from groupdocs.signature.domain import WordProcessingMetadataSignature
with Signature("sample.docx") as signature:
options = MetadataSignOptions()
signatures = [
WordProcessingMetadataSignature("Author", "Mr.Scherlock Holmes"),
WordProcessingMetadataSignature("DateCreated", datetime.now()),
WordProcessingMetadataSignature("DocumentId", 123456),
WordProcessingMetadataSignature("SignatureId", 123.456),
]
options.signatures.add_range(signatures)
result = signature.sign("signed.docx", options)
print(f"Signed with {len(result.succeeded)} metadata signature(s).")
- module
groupdocs.signature.options
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.