import aspose.slides as slides # Load presentation with slides.Presentation("presentation.pptx") as pres: # Create DigitalSignature object with PFX file and PFX password signature = slides.DigitalSignature("certificate.pfx", "password") # Comment new digital signature signature.comments = "Signing with Aspose.Slides" # Add digital signature to presentation pres.digital_signatures.add(signature) # Save presentation pres.save("SignedPPT.pptx", slides.export.SaveFormat.PPTX)