# Deleting Image signatures - advanced This article shows how to delete Image electronic signatures different ways with GroupDocs.Signature API. [**GroupDocs.Signature**](https://products.groupdocs.com/signature/java) provides [ImageSignature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.domain.signatures/imagesignature/) class to manipulate image signatures and delete them from the documents over [delete](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#delete-java.io.OutputStream-com.groupdocs.signature.domain.signatures.BaseSignature-) method. The [delete](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#delete-java.io.OutputStream-com.groupdocs.signature.domain.signatures.BaseSignature-) method writes the changed document to the file path or stream that you pass to it. To change the source document itself, pass the same path that you passed to the [Signature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/) constructor. Here are the steps to delete Image signature from the document with GroupDocs.Signature: * Create new instance of [Signature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/) class and pass source document path as a constructor parameter; * Instantiate [ImageSearchOptions](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.options.search/imagesearchoptions/) object with desired properties; * Call [search](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#-T-search-java.lang.Class-T--com.groupdocs.signature.options.search.SearchOptions-) method to obtain list of [ImageSignature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.domain.signatures/imagesignature/); * Select from list [ImageSignature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.domain.signatures/imagesignature/) object(s) that should be removed from the document; * Call [Signature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/) object [delete](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#delete-java.io.OutputStream-com.groupdocs.signature.domain.signatures.BaseSignature-)  method and pass one or several signatures to it. * Analyze [DeleteResult](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.domain/deleteresult/) result to check whether signatures were updated or not. Here are the alternative steps to delete Image signature from the document with GroupDocs.Signature. This approach is based on saved signatures Id after [search](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#-T-search-java.lang.Class-T--com.groupdocs.signature.options.search.SearchOptions-) or [sign](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#sign-java.io.OutputStream-com.groupdocs.signature.options.sign.SignOptions-) methods. * Create new instance of [Signature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/) class and pass source document path as a constructor parameter; * Instantiate one or several [ImageSignature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.domain.signatures/imagesignature/) objects with signature Id(s) passed to constructor; * Call [Signature](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/) class object [delete](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#delete-java.io.OutputStream-com.groupdocs.signature.domain.signatures.BaseSignature-)  method and pass one or several signatures to it; * Analyze [DeleteResult](https://reference.groupdocs.com/signature/java/com.groupdocs.signature.domain/deleteresult/) result to check whether signatures were updated or not.  ## Delete Image signature from the document after Search This example shows how to delete Image signature that was found using [search](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#-T-search-java.lang.Class-T--com.groupdocs.signature.options.search.SearchOptions-) method. ```java // initialize Signature instance Signature signature = new Signature("signed.docx"); ImageSearchOptions options = new ImageSearchOptions(); List signatures = signature.search(ImageSignature.class, options); List signaturesToDelete = new ArrayList(); // collect signatures to delete for (ImageSignature temp : signatures) { if (temp.getSize() > 10000) { signaturesToDelete.add(temp); } } // delete signatures DeleteResult deleteResult = signature.delete("signed.docx",signaturesToDelete); if (deleteResult.getSucceeded().size() == signaturesToDelete.size()) { System.out.print("All signatures were successfully deleted!"); } else { System.out.print("Successfully deleted signatures : "+deleteResult.getSucceeded().size()); System.out.print("Not deleted signatures : "+deleteResult.getFailed().size()); } System.out.print("List of deleted signatures:"); for(BaseSignature temp : deleteResult.getSucceeded()) { System.out.print("Signature# Id:"+temp.getSignatureId()+", Location: "+temp.getLeft()+"x"+temp.getTop()+". Size: "+temp.getWidth()+"x"+temp.getHeight()); } ``` ## Delete Image signature from the document by known signature Identifier This example shows how to delete Image signature in the document by known signature Id (that was obtained by  [search](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#-T-search-java.lang.Class-T--com.groupdocs.signature.options.search.SearchOptions-) or [sign](https://reference.groupdocs.com/signature/java/com.groupdocs.signature/signature/#sign-java.io.OutputStream-com.groupdocs.signature.options.sign.SignOptions-) method previously). ```java // initialize Signature instance Signature signature = new Signature("signed.docx"); // read from some data source signature Id value String[] signatureIdList = new String[] { "1a5fbc08-4b96-43d9-b650-578b16fbb877", "1d4cf995-3150-47a0-b17a-44c17ecf7279" }; // create list of Image Signature by known SignatureId List signatures = new ArrayList(); for (String item : signatureIdList) { signatures.add(new ImageSignature(item)); } // delete required signatures DeleteResult deleteResult = signature.delete("signed.docx",signatures); if (deleteResult.getSucceeded().size() == signatures.size()) { System.out.print("All signatures were successfully deleted!"); } else { System.out.print("Successfully deleted signatures : " + deleteResult.getSucceeded().size()); System.out.print("Not deleted signatures : " + deleteResult.getFailed().size()); } System.out.print("List of deleted signatures:"); for(BaseSignature temp : deleteResult.getSucceeded()) { System.out.print("Signature# Id:"+temp.getSignatureId()+", Location: "+temp.getLeft()+"x"+temp.getTop()+". Size: "+temp.getWidth()+"x"+temp.getHeight()); } ``` ## 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 App   Along with full-featured Java library we provide simple, but powerful free Apps. You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online **[GroupDocs Signature App](https://products.groupdocs.app/signature)**.