eSign document with Metadata signature
What is a Metadata?
A metadata is an information about resource or another data. From the document perspective metadata is a hidden document layer that contains dictionary based map with unique names and its values. Metadata name is a string based unique name, the value of metadata may contain various types like whole values, decimal values, array of data, strings etc. Each document type has custom metadata specification with predefined records and custom metadata rows.
Summary metadata may contain following information as electronic signature:
- Descriptive information about document signer, recipients, senders. Custom entries about title, subject, author, tools and keywords;
- Hidden document calculation, statistics, reference metadata about the contents and quality;
- Custom metadata that contains any object serialized as string and encoded into metadata value.
Notes below specify the differences between document types from metadata perspective:
- PDF document metadata layer supports default names to describe document summary information. Each metadata row is unique by name and its prefix that allows to customize metadata usage. The unique metadata identifier looks like tag:name pair with value assigned to it by default.
- Word processing documents (Microsoft office Words formats - DOC, DOCX, RTF, and Open Office format - ODT, OTT) contain predefined standard metadata layer and custom metadata collection to manipulate with.
- Spreadsheet documents (Microsoft Office Excel formats - XLSX, XLS and Open Office Spreadsheet OTS, ODS) keeps same standard and custom metadata collections.
- Presentation documents follow the same pattern as Word processing and Spreadsheet files.
- Images metadata distinct by whole number identifier not a name. Most identifiers range are registered to keep standard or custom image metadata information like creator information, source provider, geo location, etc
GroupDocs.Signature allows to store in metadata and extract back any user defined data object with further custom serialization and encryption. This mechanism allows to embed and transfer in the document hidden secure information over public sharing without any concerns about its hidden custom privacy information.
How to eSign document with Metadata Signature
GroupDocs.Signature provides MetadataSignOptions class to specify different options for Metadata Signature. The electronic signature as metadata allows to keep any value type or user defined objects and obtain these data back over search methods.
Different document formats implement metadata in its own way. Office document formats like Spreadsheet, Word Processing and Presentation provides metadata properties as “name-value” pairs. PDF documents provide additional attribute prefix. Image documents implement metadata properties as a list of “identifier-value” pairs. Each document format requires unique metadata name or identifier (for images).
The MetadataSignOptions class contains list of MetadataSignature objects to put or update in the document.
Document metadata could keep big amount of data that provides an ability to keep serialized custom objects with additional encryption in there.
Here are the steps to add Metadata signatures into document with GroupDocs.Signature:
- Create new instance of Signature class and pass source document path as a constructor parameter.
- Instantiate the MetadataSignOptions object according to your requirements.
- Instantiate one or several Metadata Signature (MetadataSignature) objects using class for each document type.
- for Spreadsheet document use SpreadsheetMetadataSignature class;
- for Word Processing use WordProcessingMetadataSignature class;
- for Presentation use PresentationMetadataSignature class;
- for PDF use PdfMetadataSignature class;
- for Images use ImageMetadataSignature class.
- Add initialized Metadata signatures objects to Signatures property of MetadataSignOptions;
- Call Sign method of Signature class instance and pass MetadataSignOptions to it.
Please refer to the specific examples provided below: