Skip to main content
Participant
May 26, 2020
Question

automated signing with a token based certificate

  • May 26, 2020
  • 1 reply
  • 538 views

Hi all,

 

I have an action running JavaScript to sign my documents automagically. That works great. Now that we have a higher trusted certificate, it is now token based. The code below with either bUI:true for the login or just deleted the cDIPath works with the Exception that I have to enter the password of the token (in the middleware). As I have to sign 800 certificates right now, entering the password for each document is not a solution. Is there a way to pass the password to the middleware?

 

Many thanks in Advance

/* Add Signature*/

// Validate signatures when the document is opened:
  security.validateSignaturesOnOpen = true;
  // List all the available signature handlers
  for (var i=0; i<security.handlers.length; i++)
  console.println(security.handlers);
  // Select the Adobe.PPKLite engine with the Acrobat user interface:
  var ppklite = security.getHandler(security.PPKLiteHandler, true);
var oParams = {
  cPassword: "****",
  cDIPath: "/C/Temp/Cert.pfx" // Digital signature profile
  };
  ppklite.login(oParams);

var myInfo = {
  password: "****",
  reason: "",
  mdp: "defaultAndComments"
  };

  // Sign the field:
   this.certifyInvisibleSign({oSig:ppklite,oInfo:myInfo,cDIPath:"/c/temp/"+this.documentFileName,cLegalAttest: "",bUI:false});

 

This topic has been closed for replies.

1 reply

S-T-PAuthor
Participant
June 3, 2020

According to my token provider, there is no way to automate the signing as I'd like to have it. My solution in the end was a screen macro which "simuated" me clicking the password field and typing the password.