Skip to main content
Known Participant
Aug 19, 2019 1:54 AM UTC
Answered

Spawn PDF form template

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 is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Aug 19, 2019 8:34 AM UTC

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");

3 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Aug 19, 2019 8:34 AM UTC

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");

Translate
Bernd Alheit
Community Expert
Community Expert
Aug 19, 2019 6:10 AM UTC

You can hide the button.

Translate
omanbuxAuthor
Known Participant
Aug 19, 2019 8:24 AM UTC

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

Translate