Spawning pages at the beginning of the document

Community Beginner ,
May 11, 2022 May 11, 2022

Copy link to clipboard

Copied

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/11...

but the documentation link is not valid anymore.

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

TOPICS
Acrobat SDK and JavaScript

Views

77

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
Adobe Community Professional ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

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:

 

try67_0-1652342363926.png

 

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
Engaged ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

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...

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
Adobe Community Professional ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

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.

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
Community Beginner ,
May 12, 2022 May 12, 2022

Copy link to clipboard

Copied

LATEST

Thanks. Form is already working like it is supposed to.

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