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

Correctly spawning a page

Engaged ,
Apr 05, 2019 Apr 05, 2019

For the life of me, I can't use this function correctly.  I just want to spawn a blank template and have the page be correctly numbered in the bottom when the user completes the form but needs another page to go on.

If I leave the template visible (as page one), it duplicates a filled copy of my template.  I need the new page to be blank.  So I figured the template needs to be blank and hidden. for it to spawn correctly.

To hide a blank template, I first need to spawn a copy with bRename: true which correctly puts a prefix to the page created "P1".  But once I spawn a second page from the hidden template, it has the same prefix of "P1".  Then the others gets incremental correctly.  So the first two pages are still Identical.

and for the page numbering I have these 2 calculate script

event.value = this.pageNum + 1  //this value changes according to the page a value has been changed on

event.value = this.numPages //this show the correct value

What am I not getting right?

TOPICS
Acrobat SDK and JavaScript , Windows
808
Translate
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 ,
Apr 05, 2019 Apr 05, 2019

You can hide a blank template without the spawn of a copy.

Translate
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 ,
Apr 05, 2019 Apr 05, 2019

Wouldn't the user get an empty document then?  Because there is nothing else in the doc than this one page and a button to spawn more of the same page.

Translate
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 ,
Apr 05, 2019 Apr 05, 2019
LATEST

OK I understand.

Translate
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