Skip to main content
New Participant
June 14, 2023
Question

Make multiple PDFs fillable with the same fillable fields

  • June 14, 2023
  • 2 replies
  • 1547 views

I am creating PDF order forms for hundreds of customers.  The forms are all the same template and need the same fillable field.  I found an action wizard java script that previously worked but with the updated version of adobe it no longer works properly.  Is there a way to mass make PDFs fillable with the same set of fields?

This topic has been closed for replies.

2 replies

try67
Community Expert
June 14, 2023

There's no reason a script that worked before should not work now, unless something changed about the files.

Post the code and a sample file, if possible.

New Participant
June 14, 2023

Below is the javascript that I found.  Attached is the file that I am trying to duplicate the fields.  I apologize I do not have any experience with javascript so I do not know how to trouble shoot.  I just know that last week I used this and it worked and I am trying to use it again and it does not.

 

for (var p=1; p<this.numPages; p++) {
for (var f = 0; f < numFields; f ++)
{
name = getNthFieldName(f);
type = getField(getNthFieldName(f)).type;
rect = getField(getNthFieldName(f)).rect;
fillColor = getField(getNthFieldName(f)).fillColor;
borderColor = getField(getNthFieldName(f)).borderColor;
var newField = this.addField(name, type, p, rect);
if(type = 'checkbox'){
newField.fillColor=fillColor;
newField.borderColor=borderColor;
}
}
}

try67
Community Expert
June 14, 2023

For starters, this line:

if(type = 'checkbox'){

Should be changed to:

if(type == 'checkbox'){

Also, borderColor is deprecated and should not be used. Replace it with strokeColor.

Also #2, signature fields can't be duplicated. They must have a unique name.

 

Is your ultimate goal to copy all the fields from page 1 to the other pages in the file?

ls_rbls
Community Expert
June 14, 2023

Hi @Brittany29825462yssn ,

 

I assume that you were probably using an old plug-in?

 

If yes, where did you downloaded it from?

 

Please clarify what you meant by "java script".

 

Did you mean to say that  that you have an Acrobat JavaScript (JS) script that used to work for you when invoked through the Acrobat's Action Wizard ?

 

Or are you referring to a script written in Oracle's  JAVA scripting language?

 

In any case, would you mind sharing the script, or better yet, would you be able to share a dummy PDF file of that template with no sensitive data on it?