Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Javascript help for Add Page button

New Here ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

i have a fillable pdf document that I have 2 different add page buttons. Each has a different template that duplicates that page if needed. Right now the added pages are being added to the end. 

 

What do I need to add to the javascript below to make the added page to follow right after the page and not at the end? 

 

var A = this.getTemplate("Add Page");

A.spawn();

TOPICS
General troubleshooting, How to, JavaScript, PDF forms

Views

257

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

correct answers 1 Correct answer

Advocate , May 27, 2021 May 27, 2021
Sorry that didn't work for you...... Take a look at the link below to see if this helps guide you.......https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_AcroJS%2FTemplate_methods.htm%23TOC_spawnbc-1&rhtocid=_6_1_8_74_1_0 Regards,Mike

Likes

Translate

Translate
Advocate ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

Hello,

you can give this a try.....I have not tested it.

 

var A = this.getTemplate("Add Page");

A.spawn(this.pageNum+1);

 

Regards,

Mike

 

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
New Here ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

That didn't work. When I add that it no longer adds the page at all.

 

Any other suggestions?

 

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
Advocate ,
May 27, 2021 May 27, 2021

Copy link to clipboard

Copied

LATEST

Sorry that didn't work for you......

 

Take a look at the link below to see if this helps guide you.......

https://help.adobe.com/en_US/acrobat/acrobat_dc_sdk/2015/HTMLHelp/#t=Acro12_MasterBook%2FJS_API_Acro...

 

Regards,

Mike

 

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