Renaming or Replacing a Field name through Action Wizard Jscript (batch process) Acrobat XI Pro



I am trying to run a batch process to sign multiple PDFs in one go using the Action Wizard JavaScript. These PDFs have been created on LCD 11.0

I tried using the following method to run a batch: How to use digital signature to sign 2000 pdfs in a folder at once. This works fine when I renamed the field on a PDF as "Signature1" through the Form Edit Mode. The field name on PDFs is "Signature of Employer or Authorized Person" and I cannot change the field name through editor as I do not own them. I am guessing that it doesn't read the spaces in between the field name. Is there a way to change/rename/replace a field name through JavaScript for files in a batch?

This is the script I am running:

/* Sign all files */

trustedSigning = app.trustedFunction (

   function () {   

      var myPlatform = app.platform;

      var ppklite = security.getHandler("Adobe.PPKLite");


      var f = this.getField("Signature of Employer or Authorized Person");

      var digIDPath = "/C/Files/A.pfx";

      var myPsswd = "my password";

      var myLoc = " my location";

      var myReason = "my reason";

      var myContact = "my e-mail";

      var myAppearance = "Pen Sig";


      var oParams = {

         cPassword: myPsswd,

         cDIPath: digIDPath




      try {

f.signatureSign( ppklite,

            {  password: myPsswd,

               location: myLoc,

               reason: myReason,

contactInfo: myContact,

appearance: myAppearance



      } catch (e) {

console.println("\nFatal Error = "+e.message)






This is the original field name:

field name.png

This is the message on console -- "f is null" :


Accepted Solutions (0)

Answers (0)