Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DocumentSigner.RemoveSignatures(Stream, Stream) Method

Removes signatures from a stream and saves the result.

Namespace: DevExpress.Office.DigitalSignatures

Assembly: DevExpress.Docs.v24.2.dll

NuGet Package: DevExpress.Document.Processor

#Declaration

public void RemoveSignatures(
    Stream inputStream,
    Stream outputStream
)

#Parameters

Name Type Description
inputStream Stream

The stream that contains a target file.

outputStream Stream

The stream to which to save the result.

#Remarks

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

string input_docx = "Template_signed.docx";
string output_docx = "Template_cleared.docx";

//Remove signatures from DOCX document:
using (Stream signedContent = new FileStream(input_docx, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
    using (Stream clearedContent = new FileStream(output_docx, FileMode.Create, FileAccess.Write, FileShare.Read))
    {
        DocumentSigner remover = new DocumentSigner();
        remover.RemoveSignatures(signedContent, clearedContent);
    }
}

string input_workbook = "Template_signed.xlsx";
string output_workbook = "Template_cleared.xlsx";

//Remove signatures form XLSX document:
using (Stream signedContent = new FileStream(input_workbook, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
{
    using (Stream clearedContent = new FileStream(output_workbook, FileMode.Create, FileAccess.Write, FileShare.Read))
    {
        DocumentSigner remover = new DocumentSigner();
        remover.RemoveSignatures(signedContent, clearedContent);
    }
}
See Also