Skip to main content
Participating Frequently
April 24, 2019
Question

Can you have an 'add new page' script?

  • April 24, 2019
  • 2 replies
  • 1375 views

Hi,

Firstly Thank You for taking the time to read this...

...I have a form that I am creating in Acrobat Pro X, I am pretty new to Acrobat Forms but have managed to create quite an impressive form, however I need to be able to have an 'Add New Page' button on the bottom of the pages which would create a new page with a form template on it exactly the same as the previous page...

...is this possible in Acrobat Pro or would I have to use LiveCycle Form Designer?

If I have to use LiveCycle Form Designer can I import the forms I have created in Acrobat Pro and keep all the scripts in them or would I have to totally recreate the form again in Form Designer?

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
April 24, 2019

Beware that spawning pages works in Acrobat Reader XI and DC only.

It works fine with Acrobat Pro and Acrobat Standard X, but not with Reader X and older versions.

Acrobate du PDF, InDesigner et Photoshopographe
Legend
April 27, 2019

… and how old is Reader X???

try67
Community Expert
Community Expert
April 24, 2019

Don't use LCD. It's pretty much a dead technology and the application is no longer bundled with Acrobat (your version, or maybe XI, is the last one that had it, I believe).

You can do it in a normal Acrobat form by using a Template object, which allows you to spawn copies of a page, and even lets you automatically rename the fields in it, so they are unique.

ajrogan81Author
Participating Frequently
April 24, 2019

Hi thank you for your reply.
How would I go about doing this please...is there a tutorial I could follow that you know of?

try67
Community Expert
Community Expert
April 25, 2019

Thank you for your quick replies everyone, I think I have managed it, just need to work out how to script it so that it doesn't go to the end of the document.

How would I go about placing it after page 4, would this work:

var expTplt = getTemplate("tpltFormTemplate01");

expTplt.spawn(numPages-4,true,false);

???


No, that will place it after the fourth page from the end of the file. Replace "numPages-4" with "3" (without the quotes) to achieve that.

Remember the page number is zero-based.