These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Multiple signatures and workflow

vipero00
Registered: Sep 17 2010
Posts: 3

I have a pdf form with multiple signatures.
Drawn by
checked by
approved by
---> released document
Technician
Supervisor
QA
 
I have a workflow defined on the last page of this document whick is a block diagram. Part of this block diagram are transparent buttons that do such things as saveAs form with name derived from fields on the form. Email form to a specified address. That kind of stuff.
 
The last funtionality I need is to place buttons on the workflow blocks that specifiy and initiate the signatures. When the technician is done he clicks on the workflow 'Tech Sign' block and the form jumps to the 1st page where all the signatures are and starts the Tech_Sig field signing process.
 
All the examples I've seen don't specify a field. Can I do this with javaScript?
 
I am guessing it would look something like this
 
var oActiveSigField = something("Tech_Sig");
if(oActiveSigField.signatureSign(){
app.alert("Yippie");
}else{
app.alert("Poo");
}
 
please help a newb,
 
Norm
  

My Product Information:
Acrobat Pro 9.4.2, Windows
vipero00
Registered: Sep 17 2010
Posts: 3
Here is what I have so far that seems to work except for the cDIPath doesn't become the default file name in the save dialog Why not?

Form Button Action:
  1. if(typeof(trustedSig) == "function") { // test for trusted function
  2. var fSN = this.getField('Serial No'); // get the serial number
  3. var fDash = this.getField("DUT_Dash"); //get the dash number
  4. var fName = "TPD-2612-1001-" + fDash.value + "_" + fSN.value + ".pdf"; // save file name
  5. var fSig = this.getField('SVM_Sig'); // get the digital Signature field
  6. if ( trustedSig(fSig, fName) ) {
  7. app.alert('Signing complete');
  8. } else {
  9. app.alert('Signing error')
  10. };
  11. } else {
  12. app.alert("Missing 'Folder Level Trusted Function'\n" +
  13. "Please see XXXXXXX procedure");
  14. }
TRUSTED FOLDER FUNCTION:

  1. trustedSig = app.trustedFunction(
  2. function(sigField, fName){
  3. var bSucess; // value for return
  4. try {
  5. app.beginPriv();
  6. var myEngine = security.getHandler( security.PPKLiteHandler, true );
  7. sigField.signatureSign({
  8. oSig: myEngine,
  9. cDIPath: fName,
  10. bUI: true,
  11. });
  12. app.endPriv();
  13. bSuccess = true; //set return value
  14. }
  15. catch(e){
  16. bSuccess = false; // set return value
  17. app.alert('trustedSig ' + "Error During run");
  18. }
  19. return bSuccess; // return status of action
  20. }
  21. )
Greenstead
Registered: Jul 1 2009
Posts: 17
cDIPath does not work.
Save the file first. (You need a path, not just a filename.)
var DocFullPath = this.path; // current path+filename
var DocFileName = this.documentFileName ; // current filename
var SaveTo = DocFullPath.replace(DocFileName,fName); // new path+filename
this.saveAs({
cPath:SaveTo,
bCopy:false
});

Then sign it (without cDIPATH).