Last active
March 15, 2026 07:38
-
-
Save aspose-com-kb/c07abdce5f3af01e9efdd03c19bee8eb to your computer and use it in GitHub Desktop.
Remove Signature from Word Document using Java. For details: https://kb.aspose.com/words/java/remove-signature-from-word-document-using-java/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.aspose.words.DigitalSignatureCollection; | |
| import com.aspose.words.DigitalSignatureUtil; | |
| import com.aspose.words.License; | |
| public class RemoveSignatures { | |
| public static void main(String[] args) throws Exception { | |
| License lic = new License(); | |
| lic.setLicense("license.lic"); | |
| DigitalSignatureCollection signatures = DigitalSignatureUtil.loadSignatures("SignedFile.docx"); | |
| System.out.println("Signatures count before removing signatures = " + signatures.getCount()); | |
| DigitalSignatureUtil.removeAllSignatures("SignedFile.docx", "Output.docx"); | |
| signatures = DigitalSignatureUtil.loadSignatures("Output.docx"); | |
| System.out.println("Signatures count after removing signatures = " + signatures.getCount()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment