Back to Devexpress

DocumentSigner.RemoveSignatures(String, String) Method

officefileapi-devexpress-dot-office-dot-digitalsignatures-dot-documentsigner-dot-removesignatures-x28-system-dot-string-system-dot-string-x29.md

latest2.4 KB
Original Source

DocumentSigner.RemoveSignatures(String, String) Method

Removes signatures from a file and saves the result.

Namespace : DevExpress.Office.DigitalSignatures

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public void RemoveSignatures(
    string inputFileName,
    string outputFileName
)
vb
Public Sub RemoveSignatures(
    inputFileName As String,
    outputFileName As String
)

Parameters

NameTypeDescription
inputFileNameString

The path to a target file.

| | outputFileName | String |

The path to a file where the result should be saved.

|

Remarks

The code sample below removes signatures from the DOCX and XLSX document:

csharp
static void Main(string[] args)
{
    ClearSignatures("Template_signed.docx", @"D:/Template_cleared.docx");
    ClearSignatures("Template_signed.xlsx", @"D:/Template_cleared.xlsx");
}

  private static void ClearSignatures(string path, string output)
  {
      DocumentSigner remover = new DocumentSigner();
      remover.RemoveSignatures(path, output);
      Process.Start(output);
  }
vb
Shared Sub Main(ByVal args() As String)
  ClearSignatures("Template_signed.docx", "D:/Template_cleared.docx")
  ClearSignatures("Template_signed.xlsx", "D:/Template_cleared.xlsx")
End Sub

  Private Shared Sub ClearSignatures(ByVal path As String, ByVal output As String)
    Dim remover As New DocumentSigner()
    remover.RemoveSignatures(path, output)
    Process.Start(output)
  End Sub

See Also

DocumentSigner Class

DocumentSigner Members

DevExpress.Office.DigitalSignatures Namespace