Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleSign File Attachment
var fileId = $Xml.Evaluate('File');
var attachSource = true; // true is default. Specifies the source file should be embedded in signature or not.
var format = 'X'; // X value is is default. BES, T, C, X, A values also can be used.

AltiKare.Signature.sign([fileId], attachSource, format).then(function(result) {
    
	if (result) {
	    // result.certificateName contains the name of signer
    	// result.certificateIssuer contains the issuer of signer certificate
    	// result.certificateSerialNumber contains the serial number of signer
    	// result.files.forEach(function(file) {
    		// file.sourceId contains source file id.
            // file.id contains the signature file id. if this property same with sourceId than signatured embedded in source file (like pdf or eml file formats)
    	// });
	}
   
    $Complete(!!result);
});