Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save aspose-com-kb/95e13ea24b9117112f806868feebb352 to your computer and use it in GitHub Desktop.

Select an option

Save aspose-com-kb/95e13ea24b9117112f806868feebb352 to your computer and use it in GitHub Desktop.
Remove Signature from Word Document using Python. For details: https://kb.aspose.com/words/python/remove-signature-from-word-document-using-python/
import aspose.words as aw
def main():
license = aw.License()
license.set_license("license.lic")
signatures = aw.digitalsignatures.DigitalSignatureUtil.load_signatures("SignedFile.docx")
print(f"Signatures count before removing signatures = {signatures.count}")
aw.digitalsignatures.DigitalSignatureUtil.remove_all_signatures(
"SignedFile.docx",
"Output.docx"
)
signatures = aw.digitalsignatures.DigitalSignatureUtil.load_signatures("Output.docx")
print(f"Signatures count after removing signatures = {signatures.count}")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment