Skip to main content
Known Participant
May 12, 2022
Question

Spawning pages at the beginning of the document

  • May 12, 2022
  • 1 reply
  • 535 views

Hi,

I am trying to find any information about spawning the template page at the beginning of the document, but no luck. I only found this topic: https://community.adobe.com/t5/acrobat-sdk-discussions/spawning-pages-to-specific-spot-in-pdf/m-p/11128264#M5768

but the documentation link is not valid anymore.

I wanted to spawn the template pages (2 of them) at the beginning of the document.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
May 12, 2022

You can find the documentation of the Acrobat JS API in the Acrobat SDK.

However, if all you need is the spawn method, that's pretty straight forward. Here it is:

 

 

MikelKlink
Participating Frequently
May 12, 2022

Funny detail in the context of the OP's task...

The nPage parameter is described as the 0-based page index after or on which the template is spawned while bOverlay says before or on the specified page...

try67
Community Expert
Community Expert
May 12, 2022

Yes, it's a bit confusing. The correct one is the latter. The page is spawned before the specified page number. So if you specify "0" it will become the first page in the file; If you specify this.numPages it will be the last page, etc.