Excluding specific Master Pages from Total Page Count with Javascripts

shawnFMU

01-07-2020

Is it possible to exclude certain Master Pages from the count for Total Page Count using Javascript?

 

Example:

Page Set 1, only count pages using Master Page 1 & 3 and not Master Page 2 & 4.

Page Set 2, only count pages using Master Page 2 & 4 etc...

These pages are also increasing with Add Instance objects.

 

I only know this:

this.rawValue = xfa.layout.pageCount()-1

set in a floating field, but the static offset only works for a bit. After a few more page generation, the count goes off.  

 

Unchecking "Include Page in Numbering" under Pagination works for only one set... I would like for both.

 

Help!

Thank you in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

kprokopi

07-07-2020

sure

kprokopi_0-1594105054122.png

Each content page is linked to a specific master page and keeps the sequence. Seite1 - Page 1... Seite2-Page2. Don't jump in Master Pages because that often causes empty pages and can cause trouble. I am assuming that the sequence of your pages and master pages are sequential. I cannot upload PDF or XDP here.

 

The content I faked with a subform and a text field which I gave a binding repeat subform for each data item minimum 70 so that I get 2-3 sheets per Seite simulating the normal grow of content.

kprokopi

06-07-2020

Yes if done as shown here:

kprokopi_0-1594050676416.png

Each page contains dynamic content and spreads over several sheets. Depending on which Masterpage they are assigned to the numbering is done correctly. I assigned each Seite(x) with a masterpage in sequence over 2 sets.

 

kprokopi_1-1594050775797.png

For those to be excluded I turn off the page numbering

kprokopi_2-1594050920423.png

And it works for master pages in BOTH sets. I cannot send the sample PDF here but the Page # of ## shows only the page numbers and total for the master pages included in numbering.

 

The document has 24 pages but it shows only 12 in the numbering:

kprokopi_3-1594051139164.png