Skip to main content
New Participant
May 13, 2020
Question

Spawning Pages to specific spot in PDF

  • May 13, 2020
  • 2 replies
  • 2933 views

I have a fillable PDF that triggers a hidden page template when the button "Add Benefit" is clicked.  However, it always places that spawned page at the end of the document and I need it to go after page 5 and continue to go in order if button clicked on the subsequent spawned pages that pull in.  I have searched for the Javascript syntax to do so but am not having any luck finding it for my specific situation.  

 

Current syntax is: 

 

var a = this.getTemplate ("Add Benefit");a.spawn();

 

I know it needs something about nPage or numPage but I can't figure if it needs the bRename or any of the bOverlay commands.

 

Any help would be greatly appreciated! 

This topic has been closed for replies.

2 replies

try67
Braniac
May 13, 2020

It's all explained in the documentation of that method.

kgunnzAuthor
New Participant
May 13, 2020

I have already looked at this.  This is my first time ever with Javascript so I do not know how to extrapolate the options given into actual code.  Which is why I posted here.

Thom Parker
Inspiring
May 13, 2020

Do you have any experience with programming? There are a lot of details, and I think you'd find it worthwhile to spend some time learning the basics.

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