How to Insert Signature in PowerPoint using C#

This quick tutorial guides on how to insert signature in PowerPoint using C# from a PFX certificate file. It contains information about the environment configuration, step-by-step program logic and a runnable sample code to add digital signature to PowerPoint using C#. It also provides information about setting the digital signature comments before adding them to the presentation file and saving it as a PPTX file.

Steps to Insert Signature in PowerPoint using C#

  1. Configure the environment to add Aspose.Slides for .NET to sign a presentation
  2. Create or load the file in the Presentation object that needs to be signed from a PFX certificate
  3. Instantiate a DigitalSignature class object by providing the PFX certificate file part and the password
  4. Set the desired properties of the signature to be inserted
  5. Add the newly created signature to the signatures collection of the presentation
  6. Save the updated presentation where the new signature is added

These steps describe the process of how to add signature in PowerPoint using C# by sharing the link to the necessary resource, a program sequence, and a sample code. An introduction is provided to all the necessary classes, methods, and properties which are required to accomplish the task like the Presentation class is used to create or load the presentation, and the DigitalSignature class is used to load the PFX certificate. It should be noted that this feature is currently available for PPTX files only.

Code to Insert Digital Signature in PowerPoint using C#

This code demonstrates how to add a signature in PowerPoint using C# where in the first step you load/create the presentation file using the Presentation class that provides many other constructors also to load the file from a stream instead of the disk and also use LoadOptions class object to customize the loading process. Similarly, you can set comments for the digital signature before adding it to the presentation by using the Comments property. It should be noted that for the .NET Framework equal to or higher than 4.7.0, you need to uncomment the two lines of code at the beginning of the program.

This sharp tutorial explains how to add signature to PowerPoint using C#. If you want to learn the process to encrypting a presentation, refer to the article on how to secure PowerPoint presentation in C# .NET.

 English