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

Can you have an 'add new page' script?

New Here ,
Apr 24, 2019 Apr 24, 2019

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?

TOPICS
PDF forms
1.3K
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 ,
Apr 24, 2019 Apr 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.

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
New Here ,
Apr 24, 2019 Apr 24, 2019
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
New Here ,
Apr 24, 2019 Apr 24, 2019
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
New Here ,
Apr 24, 2019 Apr 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?

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 ,
Apr 24, 2019 Apr 24, 2019

This tutorial is quite old, but still relevant: Planet PDF - A Lesson in Templates for Adobe Acrobat

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
New Here ,
Apr 25, 2019 Apr 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);

???

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 ,
Apr 25, 2019 Apr 25, 2019

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.

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
New Here ,
Apr 25, 2019 Apr 25, 2019

Hi try67,

Just one more quick question please:-

What would I put to add the page to the 'next page' (ie. the page after the one you're on), would it be "+1"

var expTplt = getTemplate("tpltFormTemplate01");

expTplt.spawn(+1,true,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 ,
Apr 25, 2019 Apr 25, 2019

Use: pageNum+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
New Here ,
Apr 25, 2019 Apr 25, 2019

THANK YOU ever so much Try67. I really appreciate it very much. Adam

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 ,
Apr 24, 2019 Apr 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
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
Advocate ,
Apr 27, 2019 Apr 27, 2019
LATEST

… and how old is Reader X???

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