Working with Digital Signatures in Jython

Aspose.Words - Working with Digital Signatures

To Work with Digital Signatures using Aspose.Words Java for Jython. Here you can see sample code.

Jython Code

from aspose-words import Settings
from com.aspose.words import FileFormatUtil
from java.text import MessageFormat
from import File
class DigitalSignatures:
    def __init__(self):
        dataDir = Settings.dataDir + 'loading_saving/'

        # The path to the document which is to be processed.
        filePath = dataDir + "document.doc"
        info = FileFormatUtil.detectFileFormat(filePath)
        if info.hasDigitalSignature():
            print MessageFormat.format(
                    "Document {0} has digital signatures, they will be lost if you open/save this document with Aspose.Words.",
            print "Document has no digital signature."
        print "Process Completed Successfully"
if __name__ == '__main__':

Download Running Code

Download running code from any of the below mentioned social coding sites: