• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

SignatureSign Microsoft Certificate Store

New Here ,
Feb 18, 2020 Feb 18, 2020

Copy link to clipboard

Copied

Hi,

 

We have a java script function that signs a document from a pfx file.  This uses the signatureSign method.  It works using a .pfx file at the moment.  We are about to purchase a USB token device to sign documents.  This does not have a .pfx file and will import the signature into the Microsft Certificate Store.  I cannot find any examples of using the SignatureSign method with the Microsoft Certificate Store only with a .pfx file.  I have spoken to various people and they all seem to think it is possible, but do not know how to do it themseleves.

 

How do I use the signatureSign method to sign from the certificate store or if you know another way to do it how do you do that?

 

The code below is for the Pfx file.  It is a function in the javascript folder that you pass the signatures password and pfx file location to and it signs.

 

DATL_SignFunc = app.trustedFunction( function (nPwd, nSigLoc, nAppearance)
{

// Additional code may appear above
app.beginPriv(); // Explicitly raise privilege
var myEngine = security.getHandler( "Adobe.PPKLite" );
myEngine.login( nPwd, nSigLoc );

b = this.addField("DATL_Sign", "signature", 0, [52, 172, 205, 150]);
b.required = true;
b.userName = "DATL_Sign";
b.signatureSign( myEngine,
{password: nPwd,// provide password
reason: "I am approving this document",
appearance: nAppearance});
app.endPriv();
// Additional code may appear below.

})

 

Darryl

 

TOPICS
Acrobat SDK and JavaScript

Views

186

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation