Remove Signature from Word Document using C#

This article describes how to remove signature from Word document using C#. It has all the details to set the IDE, a list of steps, and a sample code demonstrating how to remove a signature from a Word document using C#. You will get details on using the appropriate utility from the library to perform the activity.

Steps to Delete Signature in Word using C#

  1. Set the environment to use Aspose.Words for .NET to remove signatures from a Word file
  2. Import the necessary modules from the library
  3. Load the license to avoid watermark
  4. Use the DigitalSignatureUtil class for loading the signatures using the LoadSignatures() method
  5. Display the number of signatures in the source Word file
  6. Call the RemoveAllSignatures() method in the DigitalSignatureUtil class and pass the input and output file names
  7. Display the number of signatures in the output file after removing the signatures for confirmation

These steps summarize how to remove signature in Word using C#. Import the necessary modules and classes from the library, load the license, and load signatures of the source Word file using the DigitalSignatureUtil.LoadSignatures() method, and display the signatures count to confirm the presence of the signatures. Finally, call the RemoveAllSignatures() method in the utility by passing the input and output Word files for deleting all the signatures.

Code to Remove Digital Signature from Word Document using C#

The above code demonstrates how to remove signature from Word document using C#. The simplest process is to just call the RemoveAllSignatures() method and provide the input and output Word file names. It removes all the signatures from the Word file and creates a new output Word file at the specified path.

This article has taught us the process of removing signatures from a Word file. For adding new section breaks in a Word file, refer to the article Add Sections to Word Document in C#.