# Signing archive documents in batch This article shows how to sign documents in batch mode within the archive files with one or multiple electronic signatures [**GroupDocs.Signature**](https://products.groupdocs.com/signature/net) supports signing archive files with formats like ZIP, TAR, 7Z, LZ, GZIP the same way as usual documents. The only difference in the [SignResult](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/signresult/) of the [Sign](https://reference.groupdocs.com/signature/net/groupdocs.signature/signature/sign/) method will contain for archive files the lists of [Succeeded](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/signresult/succeeded) and [Failed](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/signresult/failed) signatures as the list of the [DocumentResultSignature](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/documentresultsignature/) instances. Here are the steps to sign the archive files like ZIP, TAR, 7z, LZ, GZIP with GroupDocs.Signature: * Create a new instance of [Signature](https://reference.groupdocs.com/signature/net/groupdocs.signature/signature) class and pass the source archive path or stream of the archive as a constructor parameter. * Instantiate the single [SignOptions](https://reference.groupdocs.com/signature/net/groupdocs.signature.options/signoptions) object or list of this class with the required options. * Call [Sign](https://reference.groupdocs.com/signature/net/groupdocs.signature/signature/sign/) method of  [Signature](https://reference.groupdocs.com/signature/net/groupdocs.signature/signature) class instance and pass [SignOptions](https://reference.groupdocs.com/signature/net/groupdocs.signature.options/signoptions) to it. * The passed signature options will be applied to the all documents within the archive. * Analyze response [SignResult](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/signresult/) over the properties [Succeeded](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/signresult/succeeded) and [Failed](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/signresult/failed) signatures as the instances of the [DocumentResultSignature](https://reference.groupdocs.com/signature/net/groupdocs.signature.domain/documentresultsignature/) ## Sign archive document This example shows how to sign archive document with few SignOptions. ```csharp /// /// Support Succeeded and Failed list as result of processing archives /// using (var signature = new Signature("sample.zip")) { // create sign options var options = new TextSignOptions("signed!") { // set signature position Left = 100, Top = 100 }; // sign archive to new zip file SignResult result = signature.Sign("output.zip", options); // analyze signed documents foreach (DocumentResultSignature document in result.Succeeded) { Console.WriteLine($"Document {document.FileName}. Processed: {document.ProcessingTime}, mls"); } if (result.Failed.Count > 0) { Console.WriteLine("\nList of failed documents:"); foreach (DocumentResultSignature document in result.Failed) { Console.WriteLine($"Document {document.FileName}. Processed: {document.ProcessingTime}, mls"); } } } ``` ## Sign single-file archive documents LZ and GZIP formats compress individual files into single-file archives, optimizing them for storage and transmission. {{< alert style="note" >}} The name of the archive file should match the name of the file contained. {{< /alert >}} This example shows how to sign GZIP archive document with SignOptions. ```csharp using (Signature signature = new Signature("sample.pdf.gz")) { // create sign options TextSignOptions options = new TextSignOptions("signed!") { // set signature position Left = 100, Top = 100 }; // sign archive to new zip file SignResult result = signature.Sign("output.pdf.gz", options); // analyze signed documents foreach (DocumentResultSignature document in result.Succeeded) { Console.WriteLine($"Document {document.FileName}. Processed: {document.ProcessingTime}, mls"); } } ``` ## More resources ### GitHub Examples You may easily run the code above and see the feature in action in our GitHub examples: * [GroupDocs.Signature for .NET examples, plugins, and showcase](https://github.com/groupdocs-signature/GroupDocs.Signature-for-.NET) * [GroupDocs.Signature for Java examples, plugins, and showcase](https://github.com/groupdocs-signature/GroupDocs.Signature-for-Java) * [Document Signature for .NET MVC UI Example](https://github.com/groupdocs-signature/GroupDocs.Signature-for-.NET-MVC) * [Document Signature for .NET App WebForms UI Example](https://github.com/groupdocs-signature/GroupDocs.Signature-for-.NET-WebForms) * [Document Signature for Java App Dropwizard UI Example](https://github.com/groupdocs-signature/GroupDocs.Signature-for-Java-Dropwizard) * [Document Signature for Java Spring UI Example](https://github.com/groupdocs-signature/GroupDocs.Signature-for-Java-Spring) ### Free Online Apps Along with the full-featured .NET library, we provide simple but powerful free online apps. To sign PDF, Word, Excel, PowerPoint, and other documents you can use the online apps from the **[GroupDocs.Signature App Product Family](https://products.groupdocs.app/signature/family)**.