eSign Presentation with Metadata signature
Leave feedback
On this page
Overview
GroupDocs.Signature provides PresentationMetadataSignature class to specify different Metadata signature objects for MetadataSignOptions instance to sign Presentation document files.
Presentation document metadata is hidden attributes, some of them are visible only over viewing standard document properties like Author, Creation Date, Producer, Entry, Keywords etc. Presentation document metadata contains pair of Name and Value, Name should be unique within the document. Presentation document metadata could keep big amount of data that allows provides ability to keep serialized custom objects with additional encryption in there.
Here are the steps to add metadata signatures into Presentation document with GroupDocs.Signature:
Create new instance of Signature class and pass source document path as a constructor parameter.
This example shows how to add Metadata signature to Presentation document.
fromdatetimeimportdatetimefromgroupdocs.signatureimportSignaturefromgroupdocs.signature.optionsimportMetadataSignOptionsfromgroupdocs.signature.domainimportPresentationMetadataSignaturedefsign_ppsx():withSignature("sample.ppsx")assignature:options=MetadataSignOptions()# Create a few Presentation Metadata signaturessignatures=[PresentationMetadataSignature("Author","Mr.Scherlock Holmes"),PresentationMetadataSignature("DateCreated",datetime.now()),PresentationMetadataSignature("DocumentId",123456),PresentationMetadataSignature("SignatureId",123.456),]# Add them to the optionsoptions.signatures.add_range(signatures)# Sign the presentation and save the resultresult=signature.sign("signed.ppsx",options)print(f"Signed with {len(result.succeeded)} metadata signature(s):")foriteminresult.succeeded:print(f" {item.name}")if__name__=="__main__":sign_ppsx()
sample.ppsx is the sample file used in this example. Click here to download it.