Batch update add fields
Copy link to clipboard
Copied
Hi,
I looked everyware and i can't seam to find anything to help.
my question is e have about 400 PDF forms that i need to add an extra text field to.
is there any way to do a batch update so i don't have to go in to every single report and update each individually.
any help will be greatly appreciated.
thanks.
Copy link to clipboard
Copied
Yes, if you have Acrobat Pro then it can be done using the Action Wizard and a custom-made script.
Copy link to clipboard
Copied
Hi Try67,
I have Acrobat Pro DC.
would it be possible to give me a exemple of how to do that?
That is 2 things i need to do.
1st is add a new Text filed called "Text200"
The other is change text fields Z1MIN, Z1MAX, CAO10,CAOLFM to read only.
Thanks man you will save my life if i can batch upadate all of those reports instead of having to go one by one.
Copy link to clipboard
Copied
Sure, I can help you with the code. I will need to know the following:
- To which page should the field be added to, and what it should look like (font, color, border, etc.)
- The exact location of that field. To get that create it and then go to its Properties, Position, switch the units drop-down to Points and copy the values and paste them here.
Copy link to clipboard
Copied
Hi Try67,
thanks man i really appreciated.
- To which page should the field be added to, and what it should look like (font, color, border, etc.)
Page 1, font: Helvetica, color: black, no borders, no fill color, font size 8.
- The exact location of that field. To get that create it and then go to its Properties, Position, switch the units drop-down to Points and copy the values and paste them here.
Left: 252.0392 Bottom: 719.3245
Right:339.9238 Top:734.8108
Width:87.8846 height: 15.4863
Copy link to clipboard
Copied
OK, and do you know how to use the Action Wizard?
Copy link to clipboard
Copied
Yes
Copy link to clipboard
Copied
OK, good, the create an Action that executes this script and then saves the file and run it on your files:
var f = this.addField("Text200", "text", 0, [252.03, 734.81, 339.92, 719.32]);
f.textFont = font.Helv;
f.textSize = 8;
f.textColor = color.black;
f.lineWidth = 0;
f.strokeColor = color.transparent;
f.fillColor = color.transparent;
this.getField("Z1MIN").readonly = true;
this.getField("Z1MAX").readonly = true;
this.getField("CAO10").readonly = true;
this.getField("CAOLFM").readonly = true;
Copy link to clipboard
Copied
(there was a typo in the last lines... fixed it now)

