I need to change the stamp ID on thousands of PDF documents; one known stamp ID to another known one
I am trying to do a mass change of thousands of PDF documents by changing the ANNOTS value of a stamp from value A to value B.
Example: I am updating the copyright data or contract number in a stamp.
I can find the value for the selected stamp in the test file by
this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
for (var i in annots) {
var annot = annots[i];
if (annot.AP=="#aI3Pm6PnqekSnIcRvvaIsB") annot.AP="#Aq8vmGycg7pPDLe3sFSf-B";
}
}
yielding a value
#XKLrjSOhC9tXY2XpCh8wIC
I can change the value of the stamps....
two stamp values shown
#aI3Pm6PnqekSnIcRvvaIsB
#Aq8vmGycg7pPDLe3sFSf-B
this.syncAnnotScan();
var annots = this.getAnnots();
if (annots!=null) {
for (var i in annots) {
var annot = annots[i];
if (annot.AP=="#aI3Pm6PnqekSnIcRvvaIsB") annot.AP = "#Aq8vmGycg7pPDLe3sFSf-B";
}
}
But I don't know how to automate this to open all the files in a folder then change the ANNOTS value and save then next file
any help or suggestions would be appreciated
Thanks,
Alan
