How to build a button that creates a new page with Acrobat XI

Learn how to build a button for a fillable PDF form that automatically spawns a new page.

By Lori Kassuba – November 14, 2013

 

In this infographic, learn how to build a button for a fillable PDF forms that automatically spawns a new page. This feature is useful if your PDF form needs a space to include additional information from your form recipients. This feature also works in Reader (but not X or earlier versions).

How to build a button that creates a new page with Acrobat XI
View transcript

How to build a button that creates a new page with Acrobat XI

Lori Kassuba – November 14, 2013

  1. Open your existing form and select Insert from File in the Pages panel under the Tools pane. Select another PDF to use as the Page Template.
  2. Click Edit in the Forms panel. Choose Text Field from the Add New Field dropdown in the Tasks panel.
  3. Add the Text Field to the new page and select Close Form Editing.
  4. Click Page Templates from the Document Processing panel under the Tools pane.
  5. Type a name for your page template and click Add. Select Yes to create a new template.
  6. To hide the new page, click the eyeball icon in the Page Templates dialog and select Close.
  7. Click Add Button in the Interactive Objects panel under the Tools pane to create a button to spawn the new page.
  8. In the Button Properties dialog, enter a name for the button and click the Actions tab. Choose Run a JavaScript from the Select Action dropdown and click Add.
  9. Type this JavaScript code (see footnote) and click OK and Close.
  10. Click Save and then Select the Hand tool and click the new button to test.

*Replace the words "Additional Information" with the name used for your page template. The Template object is configurable, for details look in the Acrobat JavaScript Reference (https://www.adobe.com/devnet/acrobat.html).



Products covered:

Acrobat XIAcrobat Reader

Related topics:

PDF Forms, JavaScript

Top Searches:


9 comments

Comments for this tutorial are now closed.

Jorge Dumangas

5, 2016-03-08 08, 2016

Hi Lori,

Great tutorial. I was able to follow the instructions and create the button and it does what it needs to do. I just want to know if it is possible to spawn a new page but only have certain information copied over to the new page? For example I want to copy over Field A but not copy Field B.

If you can guide me to the right direction that would be great.

Regards
Jorge

Lori Kassuba

4, 2015-11-30 30, 2015

Hi Ashley,

Yes, you can do this by using the nPage parameter. You can find more details on this here:
http://adobe.ly/1qm7e0S

Thanks,
Lori

Lori Kassuba

4, 2015-11-30 30, 2015

Hi Jennifer,

I see that you posted your question and Karl answered. I’ll post a link for reference:
https://answers.acrobatusers.com/Spawn-page-drop-list-q294044.aspx

Thanks,
Lori

Jennifer

6, 2015-11-18 18, 2015

Is it possible to create a drop down list to spawn multiple types of page templates made from the information from one form?
Example
Form A with B template
Form A with C template
Form A with D template
Form A with E template

Ashley H

3, 2015-11-18 18, 2015

Lori,

I have the same questions as Oliver C.


I have a multipage document and when the button is clicked to add the extra page this page comes at the end of the document. I would like this to be added at an ealier page - is this possible?

Many thanks!

Lori Kassuba

2, 2015-10-30 30, 2015

Hi Nancy,

Let me know if this answer helps address your question:
https://answers.acrobatusers.com/Is-automatically-add-update-page-numbers-tutorial-http-acrobatusers-tutorial-q156142.aspx

Thanks,
Lori

Nancy

12, 2015-10-15 15, 2015

I created the one page form to spawn, however, I would like the first page to be number page 1 of 1, then when the user needs a second page it would automatically start numbering page 1 of 1, 1 of 2, 2 of 2 and so on. Can’t seem to figure this out if it possible

Patty Friesen

3, 2015-04-05 05, 2015

Hi Mike,

Can you please post your question in the Acrobat forum so our experts can help you interactively:

https://answers.acrobatusers.com/AskQuestion.aspx

Thanks,

Patty

MIke H.

2, 2015-04-02 02, 2015

When I add a page that has named fillable boxes that are duplicated earlier in the document, the names of the boxes change, which prevents content that is filled in on the earlier pages from flowing into the added page. Is there a way to add the page but NOT have the content boxes change their names?

Lori Kassuba

2, 2014-05-09 09, 2014

Hi Oliver C,

Here is a shortened version of the URL:
http://adobe.ly/1qm7e0S
Once you get there, click on the left most icon (Show Navigation) and type in nPage.

Thanks,
Lori

Oliver C

12, 2014-05-09 09, 2014

Hi,

Sorry I didn’ see this question had already been posted - but I still couln’ work it out from the link you gave to Daniel. Can you help an further?

Thanks

Oliver C

11, 2014-05-09 09, 2014

Hello Lori,

I have a multipage document and when the button is clicked to add the extra page this page comes at the end of the document. I would like this to be added at an ealier page - is this possible?

Many thanks!

Lori Kassuba

6, 2014-04-09 09, 2014

Hi N Squires,

Could you post your question here and be sure to select the JavaScript category so our JavaScript experts can help you?
http://answers.acrobatusers.com/AskQuestion.aspx

Thanks,
Lori

N Squires

8, 2014-04-08 08, 2014

This is great. Thank you. Is there a way to automatically add/update page numbers when using this “add a page”?

Lori Kassuba

2, 2014-03-10 10, 2014

Hi Melanie,

As Karl mentions in the following discussion, the spawned template page is now a normal page in your document, so you can use deletePages() method to remove the page. If you have further questions, feel free to join this discussion:

http://answers.acrobatusers.com/hide-show-template-q147049.aspx

Thanks,
Lori

Melanie Garcia

11, 2014-03-04 04, 2014

How do you hide (remove) page when you clear the form?

Lori Kassuba

5, 2014-01-06 06, 2014

Hi daniel harrigan,

Sure, you can use the nPage parameter to do this. For specifics, check out the Javascript API reference at:
http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Acrobat9_HTMLHelp&file=JS_API_AcroJSPreface.87.1.html

Thanks,
Lori

Lori Kassuba

5, 2014-01-06 06, 2014

Hi Kim,

This does work for Reader but it specifically has to be Reader XI.

Thanks,
Lori

Kim

1, 2014-01-03 03, 2014

Great tutorial - any way to make this work for people using Reader?

daniel harrigan

9, 2013-12-18 18, 2013

Works great! Is there a way to make the hidden page insert in a specific place? My test of this process ended up with the hidden page at the end of the document.  THANKS!

Comments for this tutorial are now closed.