Skip to main content
Participant
February 6, 2023
Question

Button to copy current page + content and place in back of PDF form

  • February 6, 2023
  • 2 replies
  • 2738 views

Hello Community,

 

I've created an editable PDF form with a button to "Add page" and uses the following javascript:

 

var a = this.getTemplate("MyTemplate");
a.spawn({nPage: pageNum + 1, bRename: true, bOverlay: false});

 

The problem is that it copies only the first page (which you created a template of), where I'd rather have to "copy" the current page and content and place it as last page.

 

My question is: is it possible to create a template of the current/last page (incl. content) and place it in the back of the document?

 

Thank you in advance.

Kind regards,

JS

 

This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
February 6, 2023

Create templates for all pages.

Inspiring
February 28, 2023

Can templates have more than one page?

try67
Community Expert
Community Expert
February 28, 2023

No.

Nesa Nurani
Community Expert
Community Expert
February 6, 2023

You can create a template using 'createTemplate()' and then spawn it, but it can only be executed during a batch or console event.

Participant
February 6, 2023

Can you tell me how the javascript would look like?