eSign Image with Metadata signature

Overview

Metadata signature for Image document is an electronic signature based on image metadata standard. Most image formats support metadata specification or EXIF. Image metadata is dictionary map with unique whole short identifier in range 0-65535, Some identifiers are reserved by EXIF specification. From signature perspective image metadata may content any hidden value of standard (int,char, string) or custom type (user defined class), be encrypted and decrypted back by known key over Search method.

GroupDocs.Signature provides ImageMetadataSignature class to specify Metadata e-signature for image documents. Image document metadata contains pair with unique identifier Id and its Value.
Image document metadata could keep big amount of data that provides ability to keep serialized custom objects with additional encryption in there.

Here are the steps to add metadata signatures into Image with GroupDocs.Signature:

How to eSign Image with Metadata signature

This example shows how to sign png image with metadata e-signatures

import groupdocs.signature as signature
from groupdocs.signature.options import MetadataSignOptions
from groupdocs.signature.domain import ImageMetadataSignature
from datetime import datetime

# Initialize signature
with signature.Signature("sample.png") as sign:
    # Create metadata options
    options = MetadataSignOptions()
    
    # Specify different Metadata Signatures and add them to options signature collection
    imgs_metadata_id = 41996
    
    # Create several Image Metadata signatures with different types
    options.add(ImageMetadataSignature(imgs_metadata_id, "Mr.Scherlock Holmes"))  # String value
    imgs_metadata_id += 1
    options.add(ImageMetadataSignature(imgs_metadata_id, datetime.now()))         # Date Time value
    imgs_metadata_id += 1
    options.add(ImageMetadataSignature(imgs_metadata_id, 123456))                 # Integer value
    imgs_metadata_id += 1
    options.add(ImageMetadataSignature(imgs_metadata_id, 123.456))                # Double value
    imgs_metadata_id += 1
    options.add(ImageMetadataSignature(imgs_metadata_id, 123.456))                # Decimal value
    imgs_metadata_id += 1
    options.add(ImageMetadataSignature(imgs_metadata_id, 123.456))                # Float value
    
    # Sign document
    sign.sign("SampleSigned.png", options)

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online Apps

Along with the full-featured Python library, we provide simple but powerful free online apps.

To sign PDF, Word, Excel, PowerPoint, and other documents you can use the online apps from the GroupDocs.Signature App Product Family.