DigitalSignature class

DigitalSignature class

Represents a digital signature on a document and the result of its verification. To learn more, visit the Work with Digital Signatures documentation article.

Properties

NameDescription
applicationVersionGets the application version for the digital signature.
certificateHolderReturns the certificate holder object that contains the certificate was used to sign the document.
colorDepthGets the color depth for the digital signature.
commentsGets the signing purpose comment.
horizontalResolutionGets the horizontal resolution for the digital signature.
isValidReturns true if this digital signature is valid and the document has not been tampered with.
issuerNameReturns the subject distinguished name of the certificate isuuer.
officeVersionGets the Office version for the digital signature.
signTimeGets the time the document was signed.
signatureTypeGets the type of the digital signature.
signatureValueGets an array of bytes representing a signature value.
subjectNameReturns the subject distinguished name of the certificate that was used to sign the document.
verticalResolutionGets the vertical resolution for the digital signature.
windowsVersionGets the Windows version for the digital signature.

Examples

Shows how to validate and display information about each signature in a document.

const doc = new aw.Document(base.myDir + "Digitally signed.docx");

for (var i = 0; i < doc.digitalSignatures.count; i++) {
  const signature = doc.digitalSignatures.at(i);
  console.log(`${signature.isValid ? "Valid" : "Invalid"} signature: `);
  console.log(`\tReason:\t${signature.comments}`);
  console.log(`\tType:\t${signature.signatureType}`);
  console.log(`\tSign time:\t${signature.signTime}`);
  console.log(`\r\n`);
}

See Also