Hi everyone, I have a PDF with multiple form fields, some of which have spaces in their names (e.g., Text Field 1). I want to rename them to remove spaces (e.g., TextField1). I tried using Acrobat Javascript: for (var i = 0; i < this.numFields; i++) {
var oldName = this.getNthFieldName(i);
var newName = oldName.replace(/\s+/g, "");
this.renameField(oldName, newName); // Throws TypeError
}
…but I get this error:
TypeError: this.renameField is not a function
... View more