Skip to main content
Participant
August 19, 2025
Question

Saving Fillable form as Template & duplicating

  • August 19, 2025
  • 1 reply
  • 244 views

Hello

 

Am trying to save a fillable form as template so we can insert/populate more of the same form in a file as multiple blank pages but to-date cannot find the template or use it when we've supposedly added in Page Template.

1 reply

Thom Parker
Community Expert
Community Expert
August 19, 2025

Please outline exactly how you would like your form to work.  

An entire PDF form cannot be a "Page Template".  But individual pages within a PDF form can be made in to "Page Templates". It sounds like you would like a page in your form to be a template page, that can then be repeatedly inserted into the form. Is that correct?  

If so, then you'll find the page template tool in the "Organize Pages" toolset. 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
August 20, 2025
Hello Thom

Yes you are right. In fact, I've been reading some of your previous posts but I'm stucked in how to spawn the template thereafter as I cannot see/find it even after going through "Page Template". What happened after saving the template? How do we extract/spawn from the template? When we open the file where we'd like to populate a couple of the fillable page (which has been saved as Page Template), can't see how/where we can find the template.

Regards
Sabrina
try67
Community Expert
Community Expert
August 20, 2025

Spawning a copy of the Template requires using a script. This code will spawn a Template called "MyTemplate" as the last page of the file, with unique field names:

 

this.getTemplate("MyTemplate").spawn(this.numPages, true, false);

 

However, be aware that although the fields are uniquely named, they will have the same values as the original fields on the Template page, so it might be a good idea to clear them, but that will require a more complex script (or to hide the Template page so the fields in it are always empty).

 

Edited: Fixed small mistake in the code.