Wiki

Clone wiki

Aspose Java for Docx4j / Working-with-Digital-Signatures

Aspose.Words

// The path to the document which is to be processed.
String filePath = dataPath + "document.docx";

FileFormatInfo info = FileFormatUtil.detectFileFormat(filePath);
if (info.hasDigitalSignature())
{
    System.out.println(java.text.MessageFormat.format(
            "Document {0} has digital signatures, they will be lost if you open/save this document with Aspose.Words.",
            new File(filePath).getName()));
}
else
{
    System.out.println("Document has no digital signature.");
}

Download Source Code

Updated