Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Explorer ,
Jan 31, 2017 Jan 31, 2017

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
PDF forms
28.0K
Translate
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 Expert ,
Jan 31, 2017 Jan 31, 2017

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.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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

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

Translate
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 Expert ,
Jan 31, 2017 Jan 31, 2017

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

Translate
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

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?

Translate
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 Expert ,
Jun 17, 2019 Jun 17, 2019

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

Translate
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

How exactly do I do that with the following code?

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

Translate
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 Expert ,
Jun 17, 2019 Jun 17, 2019

Change:

nPage:this.numPages

To:

nPage:this.numPages-1

Translate
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

That worked perfect. THANK YOU.

Translate
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

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?

Translate
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 Expert ,
Jun 26, 2019 Jun 26, 2019

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

Translate
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

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

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

The JavaScript remains unchanged.

Translate
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

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!

Translate
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

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.

Translate
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

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.

Translate
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

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.

Translate
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 Expert ,
Feb 01, 2017 Feb 01, 2017

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)

.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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

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.

Translate
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

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

Translate
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 Expert ,
Feb 02, 2017 Feb 02, 2017
Translate
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

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.

Translate
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 Expert ,
Feb 03, 2017 Feb 03, 2017

Did you read the tutorial?


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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

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?

Translate
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

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.

Translate
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

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.

Translate
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