Skip to main content
All docs
V24.1

DocumentSigner.RemoveSignatures(Stream, Stream) Method

Removes signatures from a stream and saves the result.

Namespace: DevExpress.Office.DigitalSignatures

Assembly: DevExpress.Docs.v24.1.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