Skip to main content
Participant
December 20, 2017
Question

Build a button to insert a new page with fallible text boxes.

  • December 20, 2017
  • 1 reply
  • 377 views

I am working on a sort of rolling log. A sort of activity tracker if you will. I have the form built the way i want however I would like to build a button that will insert a new page. This way as the user fills the previous page he/she can click the button and the next one is inserted for them.

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
December 21, 2017

You need a Page Template.  The really cool thing about Page Templates is that they work in the Free Reader!!  This didn't used to be true. 

Create a template on the "Organize Pages" display from the "More" dropdown.

For a template named "AdditionalItems" you'd use this button MouseUp code to spawn it as a new page at the end of the file

this.getTemplate("AdditionalItems").spawn({nPage:this.numPages-1 , bRename:true,bOverlay:false});

You'll find a really good example/tutorial here:

Search Downloads

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often