How to build a button that creates a new page in Acrobat Pro DC?

Explorer ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Hi all,

I found this tutorial online which is exactly what I want to do, but it's from 2013 and some of the features/steps I cannot find. By chance has adobe made this an easier task?

On a mac.

https://acrobatusers.com/tutorials/how-to-build-a-button-that-creates-a-new-page

TOPICS
Macintosh, PDF forms

Views

8.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Hi.

This tuto is still OK.

There are some change in Acrobat DC UI but don't matters: just type the name of a tool in the Tools pane search field to find it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

I've been going through it and I must be doing something wrong because it's not working for me.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

You need to provide more information about what exactly is going wrong.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2019 Jun 17, 2019

Copy link to clipboard

Copied

I have successfully created a template to spawn a page when a button is clicked. I have 2 pages to start with and when the button is clicked, it appears as the 3rd page. I would like it to appear as the second page. How can I control where the spawned template page appears?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Jun 17, 2019 Jun 17, 2019

Copy link to clipboard

Copied

Change the value of the nPage parameter in your spawn command.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2019 Jun 17, 2019

Copy link to clipboard

Copied

How exactly do I do that with the following code?

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Jun 17, 2019 Jun 17, 2019

Copy link to clipboard

Copied

Change:

nPage:this.numPages

To:

nPage:this.numPages-1

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 17, 2019 Jun 17, 2019

Copy link to clipboard

Copied

That worked perfect. THANK YOU.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 26, 2019 Jun 26, 2019

Copy link to clipboard

Copied

So I have successfully created the button to add a new page and I have tested it all in Bluebeam Revu on my computer and it works well. Although the program I want to use this for is PDF Expert by Readdle on iPad and I just tested it on there and the buttons did nothing.. What can I do to get this to work with this program?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Jun 26, 2019 Jun 26, 2019

Copy link to clipboard

Copied

Probably nothing. You can contact Readdle and ask them to implement this feature.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

tool"Forms Edit" is now "Prepare Form" tool

"Templates" is located in the "Organize Pages" tool under "More => Page Templates".

The JavaScript remains unchanged.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2017 Feb 01, 2017

Copy link to clipboard

Copied

Thanks, I'm going to spend some time with it today and document if it goes wrong and where. I'm sure it's all user error. Unfortunately our IT upgraded us to 2017 without warning or documentation and trying to figure things out with all of my other responsibilities tends to be a bit much. My schedule is clear today to dedicate some time to it!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2017 Feb 01, 2017

Copy link to clipboard

Copied

So here's where I'm at:

I made my way down to step 10. I'm guessing that the button tool is no longer under "interactive objects" but under prepare form/button tool (box with "ok" inside)?

I created the button, added the javascript, changing the name to the name I gave my template (which I unchecked the eyeball on) and found that the button name that I assigned does not show up and when I click the button in preview mode, get the spinning wheel & acrobat crashes.

What I don't understand throughout all of this is the need for step 3 - add text field. I add a text box from the prepare form section, the close out of prepare forms? What is the point of the text box? I'm trying to understand the process.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2017 Feb 01, 2017

Copy link to clipboard

Copied

another update: started from scratch. I found that only the page that I designate as the template will allow me to place a button on it (so i cannot turn off that page then, right?). Still cannot get text to show up inside the button or change the font size in the button in the properties window.

Still crashes overtime I go to preview and click the button.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 06, 2017 Feb 06, 2017

Copy link to clipboard

Copied

You are creating the blank form and then making that into a template which can be hidden and used to create a new form page.

1. Create the form.

2. Make form into template.

3. Spawn new page from template with form fields renamed.

4 Rename form fields on the generated form to be prefixed "P0.".

5. Hide template page.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 01, 2017 Feb 01, 2017

Copy link to clipboard

Copied

You will find another great tuto for creating new pages here: http://abracadabrapdf.net/ressources-et-tutos/js-et-formulaires-ressources/dupliquer-dynamiquement-d...

(Google translate is your friend)

See also these great samples PDFs:

http://abracadabrapdf.net/file/Trombinoscope-depart.pdf   (start document)

http://abracadabrapdf.net/file/Trombinoscope-final.pdf   (final document)

http://abracadabrapdf.net/file/Trombinoscope-rempli.pdf   (demo document)

.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Is there anything out there that gives a tutorial in the latest version of the software? This is interesting but I'm not well versed in javascript and I'm already getting lost in the explanations.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Also the example document links don't work on my end.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 02, 2017 Feb 02, 2017

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Thank you so much! I copied what was in the files and tried again but each time I put the file in preview and hit the button I get the wheel and then a crash. I'm going to try an unrelated file. Maybe what I've been using has gone corrupt? So frustrating because those sample files work so smoothly and without an issue.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Did you read the tutorial?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

Yes! I got it to work on a clean file! Thank you!

Now I noticed that the button only exists on the first page. How do I get it so that the button appears on each additional page. The form I'm creating will have reviews from construction sites from people from different principles. Some are more wordy than others  so if they need to keep adding pages for their reviews is it possible to have the button appear on each page?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

ALSO! How do you stop the form from repeating the information in the fields on the additional pages? Like I've said before my javascript is very very basic.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 03, 2017 Feb 03, 2017

Copy link to clipboard

Copied

I have the Rename set to true.

Here is an example of what I get:

Screen Shot 2017-02-03 at 1.50.31 PM.png

Screen Shot 2017-02-03 at 1.50.44 PM.png

It does rename the fields but the information still carries over.

I do get the following message when I add a page as a template:

Any form fields that have the same name in the merged documents are now merged into one field. If you want the values in these fields to be unique, then you need to create a PDF Portfolio  instead of merging the files. To create a PDF Portfolio, choose File > Create PDF Portfolio.

Which totally confuses me.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines