WordProcessingMetadataSignature class

WordProcessingMetadataSignature class

Represents a Word Processing metadata signature.

Used with MetadataSignOptions to add metadata signatures to Word Processing documents.

The WordProcessingMetadataSignature type exposes the following members:

Constructors

Constructor Description
init Initializes a WordProcessingMetadataSignature with the specified name and an empty value.
init Initializes a WordProcessing metadata signature with predefined values.

Methods

Method Description
clone Clone Metadata Signature instance.
clone Creates a clone of the WordProcessingMetadataSignature instance with the specified value.
clone_object
to_string Converts the metadata signature to a string.
to_string Converts the metadata signature to a string with the specified format.
to_string_file
to_string_string
equals Determines whether the specified signature is equal to this instance. (inherited from MetadataSignature)
equals_object (inherited from MetadataSignature)
get_data (inherited from MetadataSignature)
get_data_idata_encryption (inherited from MetadataSignature)
get_hash_code Returns the hash code for the metadata signature. (inherited from MetadataSignature)
to_boolean Converts to boolean. (inherited from MetadataSignature)
to_date_time Converts the metadata signature value to a datetime. (inherited from MetadataSignature)
to_date_time_iformat_provider (inherited from MetadataSignature)
to_decimal Converts the metadata signature value to Decimal. (inherited from MetadataSignature)
to_decimal_iformat_provider (inherited from MetadataSignature)
to_double Converts the metadata signature value to a float. (inherited from MetadataSignature)
to_double_iformat_provider (inherited from MetadataSignature)
to_integer Converts the metadata signature value to an integer. (inherited from MetadataSignature)
to_single Converts the metadata signature value to a float. (inherited from MetadataSignature)
to_single_iformat_provider (inherited from MetadataSignature)

Properties

Property Description
created_on The signature creation date. (inherited from BaseSignature)
data_encryption The implementation of IDataEncryption used to encode and decode signature value properties. (inherited from MetadataSignature)
deleted The flag indicating whether this signature was deleted from the document. (inherited from BaseSignature)
height The height of the signature. (inherited from BaseSignature)
is_signature The flag indicating whether this component represents a signature (True) or document content (False). (inherited from BaseSignature)
left The left position of the signature. (inherited from BaseSignature)
modified_on The signature modification date. (inherited from BaseSignature)
name The unique metadata name. (inherited from MetadataSignature)
page_number The page number where the signature was found. (inherited from BaseSignature)
signature_id The unique identifier of the signature, used to modify the signature in the document via update or delete operations. (inherited from BaseSignature)
signature_type The type of signature. (inherited from BaseSignature)
top The top position of the signature. (inherited from BaseSignature)
type The metadata value type. (inherited from MetadataSignature)
value The metadata object. (inherited from MetadataSignature)
width The width of the signature. (inherited from BaseSignature)

Example

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. Sherlock 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):")
    for item in result.succeeded:
        print(f"  {item.name}")

See Also