Skip to main content
Known Participant
August 19, 2019
Answered

Spawn PDF form template

  • August 19, 2019
  • 2 replies
  • 958 views

Hi, I have one pages PDF form & i want to make 100 duplicates with unique field names. looks like bellow button code will work but i want to do it in once click. also after making 100 pages, i want to delete the buttons. anybody can help me to do it ??. thanks..

this.spawnPageFromTemplate("GMFT");

This topic has been closed for replies.
Correct answer try67

This method has been deprecated. Here's how you should do it (assuming there's only one Template in your file):

var t = this.templates;

var T = t[0];

var XO = T.spawn(this.numPages, true, false);

for (var i=0; i<=99; i++) T.spawn(this.numPages, true, false, XO);

And then you can remove the field like this:

this.removeField("SpawnPages");

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
August 19, 2019

This method has been deprecated. Here's how you should do it (assuming there's only one Template in your file):

var t = this.templates;

var T = t[0];

var XO = T.spawn(this.numPages, true, false);

for (var i=0; i<=99; i++) T.spawn(this.numPages, true, false, XO);

And then you can remove the field like this:

this.removeField("SpawnPages");

Bernd Alheit
Community Expert
Community Expert
August 19, 2019

You can hide the button.

omanbuxAuthor
Known Participant
August 19, 2019

ok so to create 100 copies, i have to press that button 100 times ??