• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

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

 

TOPICS
PDF forms

Views

1.5K

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 Expert ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

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

Votes

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 ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

Can you tell me how the javascript would look like?

Votes

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 Expert ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

But that won't work if the file is used in Reader. It's better to create Templates from all the pages in advance, and then spawn copies from them.

Votes

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 Expert ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

Create templates for all pages.

Votes

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 ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

The forms stays the same but the content varies.

 

Use case would be that the user:

- navigates to last page

- presses "Add page"

- edits newly spawned page

- saves document

 

It's a continuous process, so creating templates is not an option. Unless it's scripted in the mouseclick action of "add page". Something like create template and then directly spawn template or just copy last/current page and place it in the back of the document.

Do you know how to do this? 

Votes

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 Expert ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

You can only do that if all the users have Acrobat, and you can install a script file on their local computers in advance.

Votes

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 ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

Thanks for the replies and clarification!

Votes

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
Explorer ,
Feb 28, 2023 Feb 28, 2023

Copy link to clipboard

Copied

Can templates have more than one page?

Votes

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 Expert ,
Feb 28, 2023 Feb 28, 2023

Copy link to clipboard

Copied

No.

Votes

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
Explorer ,
Mar 01, 2023 Mar 01, 2023

Copy link to clipboard

Copied

LATEST

Thank you! 🙂

Votes

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