Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Pagination Issue

Avatar

Level 3

Hi All,

I need assistance in pagination issue.

We have requirement where we have different form ID's in one form and each form having dynamic repetable subforms and we have mapped each formid page to different master page in a form.

The paginations should calculate each form ID individually in a form.

I tried with xfa.layout.page(this) and xfa.layout.PageCount() but these properties getting total number of the pages in a form and current page.

But we need as each formid ID start with first page and page count as per form ID in a form.

any ideas would be great

Thank you in advance.

Jay

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

counting instances of master page is difficult, as you cannot use the instance manager properties.

But it's not impossible.

Assumning you have a form with two master pages (Master1 and Master2) and want to add individual page counts on each master page.

1. On each master page create a text object for you counter.

2. Add two floating text objects to the text. One for the current page and the total count of this master page.

3. for the current page use this script in the layout:Ready event:

$ = $.parent.index + 1

4. And for the total count this script:

$ = xfa.resolveNodes("Form1.#pageSet.Master1[*]").length

Here's a sample.

https://acrobat.com/#d=Dd3-n4xxJWL8R1YmZ5qfdQ

View solution in original post

6 Replies

Avatar

Level 10

Hi,

here's a sample of a form with several individual page counts.

https://acrobat.com/#d=N2YtptDipOHBHdT5445RWg

Avatar

Level 3

Hi,

Thank you for the reply.

I could not open the link.(Browser showing as page cannot be displayed).

Could you pls share the PDF or link again.

Thank you in advance

Jay

Avatar

Level 3

Hi,

Thank you,

Now i can open the link and thank you for sharing the PDF.

In our form the requiremnt is we are using the pagination fields on Master page and mapping different master pages for different pages(Ex PageA, PageB). and for each paage there are few repetable subform sections.

In the provided PDF the fields are on page and page is repeating or we cann add the page. but in my case we have subforms in a page and subforms are repetable.

dou you have any example pagination PDF or any ides would be great.

Thank you,

Jay

Avatar

Level 3

Hi,

I could find the count of the each page(PageA, PageB).

I need someone help in below requiremnt.

Pagination of each page(ex PageA, PageB) in a form should start with one(1). and if the page (PageA) count is 2 the cureent page should display as 1 and 2 respectively.

Is ther any proprty to retrive the current page of the each page as 1

Thank you in advance

Jay

Avatar

Correct answer by
Level 10

Hi,

counting instances of master page is difficult, as you cannot use the instance manager properties.

But it's not impossible.

Assumning you have a form with two master pages (Master1 and Master2) and want to add individual page counts on each master page.

1. On each master page create a text object for you counter.

2. Add two floating text objects to the text. One for the current page and the total count of this master page.

3. for the current page use this script in the layout:Ready event:

$ = $.parent.index + 1

4. And for the total count this script:

$ = xfa.resolveNodes("Form1.#pageSet.Master1[*]").length

Here's a sample.

https://acrobat.com/#d=Dd3-n4xxJWL8R1YmZ5qfdQ

Avatar

Level 3

Thank you,

Its working perfect.

Regards,

Jay