ImageMetadataSignature class

ImageMetadataSignature class

Represents an image metadata signature.

Metadata signatures for image documents are electronic signatures based on image metadata standards such as EXIF. Each signature is identified by a numeric identifier (0‑65535) and stores a value of various types (text, date/time, integer, floating‑point).

The ImageMetadataSignature type exposes the following members:

Constructors

Constructor Description
init Initializes an Image Metadata Signature with the specified identifier and value.

Methods

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

Properties

Property Description
description The description of the standard Image Metadata signature.
id The identifier of Image Metadata signature. See GroupDocs.Signature.Domain.ImageMetadataSignatures class that contains standard Signature with predefined Id value.
size The size of the metadata value.
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 ImageMetadataSignature


def sign_png():
    with Signature("sample.png") as signature:
        options = MetadataSignOptions()

        metadata_id = 41996
        options.add(ImageMetadataSignature(metadata_id, "Mr.Scherlock Holmes"))   # text
        options.add(ImageMetadataSignature(metadata_id + 1, datetime.now()))    # date and time
        options.add(ImageMetadataSignature(metadata_id + 2, 123456))            # whole number
        options.add(ImageMetadataSignature(metadata_id + 3, 123.456))           # floating‑point number

        result = signature.sign("signed.png", options)
        print(f"Signed with {len(result.succeeded)} metadata signature(s):")
        for item in result.succeeded:
            print(f"  {item.id}")

See Also